in reply to How to access multiple hash variables defined in a module
As zwon writes above, you can always access the hashes with their fully qualified notation %XYZ::Hash1, but you don't need Exporter for that in package XYZ.
However,if you make the hashes available to the caller via @EXPORT_OK, you can import them stating
use XYZ qw(%Hash1 %Hash2);
which makes them accessible as %Hash1 and %Hash2 in the importing namespace.
print "$_ => $Hash1{$_}\n" for keys %Hash1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to access multiple hash variables defined in a module (Exporter)
by Anonymous Monk on Feb 22, 2010 at 09:10 UTC | |
by zwon (Abbot) on Feb 22, 2010 at 12:49 UTC | |
by shmem (Chancellor) on Feb 22, 2010 at 12:33 UTC |