in reply to How to use a bunch of uses with just one use?

Personally, I like the list of modules to be explicit, but there is Toolkit to manage your own list of "default" modules.

  • Comment on Re: How to use a bunch of uses with just one use?

Replies are listed 'Best First'.
Re^2: How to use a bunch of uses with just one use?
by shmem (Chancellor) on Aug 07, 2015 at 12:05 UTC

    Toolkit is a source filter, so the usual caveats apply.

    I personally like explicit module mention, too, but I have

    package y; use Exporter qw (import ); our @EXPORT = qw ( &foo ); # exported functions my $callpack = ( caller )[0]; eval <<"EOH"; package $callpack; use Data::Dumper; use B::Deparse; # other modules... EOH sub foo { ... } 1;

    which allows me to

    #!/usr/bin/Perl use strict; use warnings; use y;

    or on the command line

    qwurx [shmem] ~> perl -My -nle 'dwim $_' somefile

    having all defaults in place. Pragmas like strict and warnings should always be explicit.

    perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'
Re^2: How to use a bunch of uses with just one use?
by BluePerl (Acolyte) on Aug 07, 2015 at 06:55 UTC

    Thank you for your answer. Toolkit could be an option. I would prefer to have something similar to Toolkit. I need to have those obligatory modules only for some projects and not for each and every one.