http://www.perlmonks.org?node_id=654321


in reply to Packages and symbol tables

BEGIN { print "$_ => $Foo::{$_}\n" foreach keys %Foo::; }
is probably better in your specific case.

Anyway, my guess at what's going wrong is that base is trying to be clever in a way that you don't expect.

Since you're defining the packages in the same file, just drop the use base and do:

package Foo::Bar; our @ISA = 'Foo';

Replies are listed 'Best First'.
Re^2: Packages and symbol tables
by johnnywang (Priest) on Dec 01, 2007 at 18:17 UTC
    Thanks Joost, your suggested change to use @ISA solved the problem (although I'm now on to the next one!) care to explain the thinking in your message?