princepawn has asked for the wisdom of the Perl Monks concerning the following question:
sub AUTOLOAD { my $name = $AUTOLOAD; $name =~ s/^.*:://; *$name = sub { ....... }; goto &$name; }
My question is: what package will the subroutine be created in? The invoking package name or the package that AUTOLOAD is defined in?
My guess is the latter, not the former but I wanted to make sure.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: oop - obvious AUTOLOAD question
by fglock (Vicar) on Sep 25, 2002 at 18:00 UTC | |
|
Re: oop - obvious AUTOLOAD question
by mirod (Canon) on Sep 25, 2002 at 18:18 UTC | |
|
Re: oop - obvious AUTOLOAD question
by thraxil (Prior) on Sep 25, 2002 at 18:06 UTC | |
|
Re: oop - obvious AUTOLOAD question
by rir (Vicar) on Sep 25, 2002 at 18:47 UTC | |
by fglock (Vicar) on Sep 25, 2002 at 18:51 UTC | |
by rir (Vicar) on Sep 25, 2002 at 20:57 UTC | |
by sauoq (Abbot) on Sep 26, 2002 at 05:11 UTC | |
by rir (Vicar) on Sep 26, 2002 at 11:48 UTC | |
|