Think about Loose Coupling | |
PerlMonks |
Re^4: Removing CODE slot in typeglob / Reversing "use subs ...;"by lodin (Hermit) |
on Jan 03, 2008 at 18:58 UTC ( [id://660298]=note: print w/replies, xml ) | Need Help?? |
It's the $false playing tricks again. $::{FOO} is the typeglob for FOO in main, and a typeglob can be dereferenced as a hash, and that's exactly what $::{FOO}{CODE} does. It becomes more clear if you add the arrow: $::{FOO}->{CODE}. The reason it works without the arrow is that $::{FOO} is an element of the %:: hash, so it's no different than $foo{bar}{baz}.
lodin
In Section
Seekers of Perl Wisdom
|
|