in reply to Where is the @ISA array?
@__PACKAGE__::ISA means @ISA in the package "__PACKAGE__", not the current package.
use strict; use warnings; use base 'CGI'; print "@main::ISA\n"; # CGI our @ISA; print "@ISA\n"; # CGI my @ourISA = do { no strict 'refs'; @{__PACKAGE__ . '::ISA'} }; print "@ourISA\n"; # CGI
I wouldn't use base. It's even been obsoleted with parent in newer versions of Perl.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Where is the @ISA array?
by metaperl (Curate) on Jan 21, 2009 at 15:37 UTC | |
by ikegami (Patriarch) on Jan 21, 2009 at 15:53 UTC | |
|
Re^2: Where is the @ISA array?
by Anonymous Monk on Jan 22, 2009 at 00:01 UTC | |
by ikegami (Patriarch) on Jan 22, 2009 at 05:39 UTC | |
by Anonymous Monk on Jan 22, 2009 at 13:31 UTC | |
by Corion (Patriarch) on Jan 22, 2009 at 13:40 UTC | |
by Anonymous Monk on Jan 22, 2009 at 13:48 UTC | |
| |
by ikegami (Patriarch) on Jan 22, 2009 at 14:02 UTC |