perl-docs-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-docs/src/docs/2.0/api/ModPerl MethodLookup.pod
Date Fri, 13 Feb 2004 22:52:09 GMT
stas        2004/02/13 14:52:09

  Modified:    src/docs/2.0/api/ModPerl MethodLookup.pod
  Log:
  - lookup_method now supports sub-classed objects
  - fix an AUTOLOAD example
  
  Revision  Changes    Path
  1.9       +6 -5      modperl-docs/src/docs/2.0/api/ModPerl/MethodLookup.pod
  
  Index: MethodLookup.pod
  ===================================================================
  RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/ModPerl/MethodLookup.pod,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -u -r1.8 -r1.9
  --- MethodLookup.pod	17 Dec 2003 20:21:59 -0000	1.8
  +++ MethodLookup.pod	13 Feb 2004 22:52:09 -0000	1.9
  @@ -81,8 +81,10 @@
   which is a blessed object or the class it's blessed into. If there is
   more than one matches this extra information is used to return only
   modules of those methods which operate on the objects of the same
  -kind. This usage is useful when the C<L<AUTOLOAD|/C_AUTOLOAD_>> is used
  -to find yet-unloaded modules which include called methods.
  +kind. If the second argument is a sub-classed object it'll be handled
  +correctly, by checking its super-class.  This usage is useful when the
  +C<L<AUTOLOAD|/C_AUTOLOAD_>> is used to find yet-unloaded modules which
  +include called methods.
   
   Examples:
   
  @@ -290,11 +292,10 @@
       use Carp;
       sub handler {
     
  -        # exclude DESTROY resolving
  -        my $skip = '^(?!DESTROY$';
           *UNIVERSAL::AUTOLOAD = sub {
               my $method = $AUTOLOAD;
  -            return if $method =~ /DESTROY/;
  +            return if $method =~ /DESTROY/; # exclude DESTROY resolving
  +
               my ($hint, @modules) =
                   ModPerl::MethodLookup::lookup_method($method, @_);
               $hint ||= "Can't find method $AUTOLOAD";
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-cvs-help@perl.apache.org


Mime
View raw message