summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
authorRob Hoelz <rob@hoelz.ro>2010-09-13 11:44:57 -0500
committerFlorian Ragwitz <rafl@debian.org>2010-09-15 19:45:54 +0200
commit80ee23cddd2cb9c4e75c09f830c2459fca38a2c9 (patch)
tree9469471d3432b01be4d99932cf69bc53583b8533 /pod
parent68585b5ebe5d00d93dc3859b2f1c41cd2646f997 (diff)
downloadperl-80ee23cddd2cb9c4e75c09f830c2459fca38a2c9.tar.gz
Update AUTOLOAD section in perlsub
AUTOLOAD documentation didn't mention that if AUTOLOAD is implemented as an XSUB, $AUTOLOAD is not populated.
Diffstat (limited to 'pod')
-rw-r--r--pod/perlsub.pod6
1 files changed, 5 insertions, 1 deletions
diff --git a/pod/perlsub.pod b/pod/perlsub.pod
index 325c823bff..93f6e5f5af 100644
--- a/pod/perlsub.pod
+++ b/pod/perlsub.pod
@@ -1425,7 +1425,11 @@ of the original subroutine magically appears in the global $AUTOLOAD
variable of the same package as the C<AUTOLOAD> routine. The name
is not passed as an ordinary argument because, er, well, just
because, that's why. (As an exception, a method call to a nonexistent
-C<import> or C<unimport> method is just skipped instead.)
+C<import> or C<unimport> method is just skipped instead. Also, if
+the AUTOLOAD subroutine is an XSUB, C<$AUTOLOAD> is not populated;
+instead, you should call L<< C<SvPVX>E<sol>C<SvCUR>|perlapi >> on the
+C<CV> for C<AUTOLOAD> to retrieve the method name.)
+
Many C<AUTOLOAD> routines load in a definition for the requested
subroutine using eval(), then execute that subroutine using a special