in reply to Re: creating a new symbol table glob
in thread creating a new symbol table glob
I can't decide if this is so hard because globs are such strange scalars or because symbol tables are such perfectly ordinary hashes.my $opkg = \%pkg::; local %pkg::; $_ ne "foo" and *{"pkg::$_"}=$opkg->{$_} for keys %$opkg;
(About the compile-time lookup of globs, I remember once seeing a quote from Larry complaining about an optimization that made globals faster but not lexicals. Making every global reference look up the glob afresh sure would be a hearty encouragement to always use lexicals. :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: creating a new symbol table glob
by Anonymous Monk on Nov 05, 2003 at 04:32 UTC | |
by jql (Acolyte) on Nov 05, 2003 at 04:39 UTC |