in reply to multiple modules
You could write your own:
package all; sub import { shift; my $caller = caller(); my $code = "package $caller; use " . join '; use ', @_; eval $code; } 1;
And then use it like this:
use all qw[strict warnings Time::HiRes Data::Dumper List::Util];
Unfortunately, there is no way to specify an import list for each module, so you get everything that they export, which could be nothing at all for some modules, or much more than you wanted, or just not what you need. Eg. No way to tell List::Util that you want to use sum()
Fixing that is left as an exercise for the reader :)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: multiple modules
by xdg (Monsignor) on Oct 28, 2005 at 08:34 UTC |