in reply to Package Variables in Inheritance
So, yes, SUPER:: is strictly for subroutines. Although you can get to the current package's variable, it will have to be symbolically e.g
sub test { no strict 'refs'; print "name: ", ${"$_[0]::name"}, "\n"; } $foo::name = "I'm a foo"; $bar::name = "I'm a bar"; @foo::ISA = @bar::ISA = 'main'; foo->test(); bar->test(); __output__ name: I'm a foo name: I'm a bar
_________
broquaint
|
|---|