in reply to You can hack anything...
in thread Using tie to initialize large datastructures
I am definitively with you on the point of using so many globals. I would never consider to do something like this on many global variables just because of efficiency concerns. A design that needs such hacks is probably flawed.
OTOH, I found this to be an interesting problem with respect to tie() usage.
As for your suggestion - thanks! This really works. Funny. You can even use the code like it stands. Just pass in a ref to the lexical, and you're done. Like this:
my $baz3; tie($baz3, "MyGlobals", "LegacyRoutines::baz", \$baz3); print $baz3, "\n"; print $baz3, "\n";
Christian Lemburg
Brainbench MVP for Perl
http://www.brainbench.com
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 2: You can hack anything...
by tilly (Archbishop) on Aug 08, 2001 at 20:40 UTC |