in reply to Inheritance question
Or, replace: @ISA = qw/A/ with: use base 'A'.
The problem is that @ISA = qw/A/ is not being run at compile time, and so package B isn't completely set up before you call B->new().