in reply to Package Variables in Inheritance

What you want to have happen (searching your data hierarchy) only happens with method lookups. With direct function calls, you don't get that behaviour. That is, in your above example,
Test->new(); # Calls Obj::new Test::new(); # Fails $Test::$foo; # Fails for the same reason that Test::new did
The SUPER:: trick works by SUPER::AUTOLOAD catching method calls and redirecting it up the inheritance hierarchy.

Therefore you will either have to arrange to be using method lookups (exactly like perrin suggested) or you will have to figure out the package that you want to look things up in and look stuff up dynamically on the fly using typeglobs etc.

Of the two options, I would think that methods are a cleaner way to go. But if you want...

sub test { my $self = shift; my $class = ref($self) || $self; local $Name; { no strict 'refs'; *Name = \${"$class\::Name"}; } print $Name; }