http://www.perlmonks.org?node_id=503554


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 :)


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.