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 | b09053b7a5626b7fe68e4fceaee03b9fe3f1b28c (patch) | |
tree | 2ab912c12ae7a33d56d4a296bbaaeac7d631b720 /pod/perlobj.pod | |
parent | 54c819754af09ffbc24b4ed9634cc1b492a61988 (diff) | |
download | perl-b09053b7a5626b7fe68e4fceaee03b9fe3f1b28c.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 |