Next | Tricks of the Wizards | 197 |
my $exported = \%{$me . '::exports'};
... $exported->{$name} ...
That worked well enough, but here's a better trick
local *exported = \%{$me . '::exports'};
Now %exported is the hash.
... $exported{$name} ...
You want the local so the change is confined to import
You can't my a glob.
Next | Copyright © 2003 M. J. Dominus |