in reply to AUTOLOAD question
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)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: AUTOLOAD question
by adrianh (Chancellor) on Dec 01, 2003 at 00:22 UTC |