in reply to displaying package variable from inherited method.
Prints the variable $data in package "proto". Not the variable $data in package $proto, so to speak.print $proto::data
To fix this, you'll need a symbolic reference. Like
I don't really like this setup, though. Personally I'd prefer using closures to access the data.no strict 'refs'; print ${"${proto}::data"};
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: displaying package variable from inherited method.
by wazoox (Prior) on Jun 10, 2006 at 15:00 UTC | |
by Joost (Canon) on Jun 10, 2006 at 15:10 UTC | |
by wazoox (Prior) on Jun 10, 2006 at 15:21 UTC |