diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2000-07-26 17:49:14 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-07-26 17:49:14 +0000 |
commit | ed8504609e65bf608915df5053decb2c1e5c56e9 (patch) | |
tree | 2ab912c12ae7a33d56d4a296bbaaeac7d631b720 /pod/perlobj.pod | |
parent | cc50a2034c8f38d702b126ee0ae87fcad255227a (diff) | |
download | perl-ed8504609e65bf608915df5053decb2c1e5c56e9.tar.gz |
Allow "sub AUTOLOAD;" to stop AUTOLOAD inheritance,
from Graham Barr in the module list.
p4raw-id: //depot/perl@6444
Diffstat (limited to 'pod/perlobj.pod')
-rw-r--r-- | pod/perlobj.pod | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pod/perlobj.pod b/pod/perlobj.pod index 4e45aff7c6..9a9bda94d9 100644 --- a/pod/perlobj.pod +++ b/pod/perlobj.pod @@ -168,6 +168,12 @@ the method that was intended to be called. If none of that works, Perl finally gives up and complains. +If you want to stop the AUTOLOAD inheritance say simply + + sub AUTOLOAD; + +and the call will die using the name of the sub being called. + Perl classes do method inheritance only. Data inheritance is left up to the class itself. By and large, this is not a problem in Perl, because most classes model the attributes of their object using an |