Interesting. I don't have an answer per sey ... but this test seemed to work for me:
use strict; use warnings; my $bar = bar->new; $bar->foo; package foo; sub new { return bless {}, shift } package bar; use base qw( foo ); use Data::Dumper; sub new { return bless {}, shift } sub foo { print Dumper \@INC }
DOH! ... silly /me -- of course that works ... i typo'ed and used @INC, not @ISA --- that final method should have been:
Which is empty. :/ I give up.sub foo { print Dumper @__PACKAGE__::ISA }
UPDATE round 2:
That final method should have been:
Which does indeed yield the parent class. I am not sure why use base is no longer acceptable for Perl 5. It was supposed to replace the need to push to @ISA directly -- perhaps use base is not going to cut the mustard when roles and traits show up?sub foo { print Dumper @bar::ISA }
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: Where is the @ISA array?
by jeffa
in thread Where is the @ISA array?
by metaperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |