in reply to Undefining symbol tables and globs and things, oh my
How does perl know how to find $Yakkity::Yak::a after the package's symbol table is gone?Because you have a compile-time reference to the typeglob associated with a, in the code print "a = $Yakkity::Yak::a\n"; undeffing the symbol table just removes a ref to the typeglob; the typeglob itslef continues to exist. At run-time, perl ops do not lookup variables in stashes; instead the ops contain a pointer to the typeglob.
Dave.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Undefining symbol tables and globs and things, oh my
by ikegami (Patriarch) on Aug 10, 2005 at 13:56 UTC |