So that you don't get an extra AUTOLOAD "hit" when your object dies, such as with this code:sub DESTROY {}
package Foo; our $AUTOLOAD; sub new {bless {}, shift} sub AUTOLOAD { my $self = shift; my ($method) = $AUTOLOAD =~ /([^:]+)$/; # no need for s/// print "$method was called\n"; } package main; new Foo;
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
In reply to Re: AUTOLOAD question
by jeffa
in thread AUTOLOAD question
by forrest
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |