How to install multiple perl modules at once using CPAN

Is it possible to install multiple modules using CPAN? I tried:

perl -MCPAN -e 'install DBIx::Transaction File::Basename::Object'

but I get this error:

Can't locate object method "Transaction" via package "DBIx" at -e line 1
+4
source share
2 answers
cpan DBIx::Transaction File::Basename::Object

or if you are trying to make sure that a particular one is being used perl,

perl -MCPAN -e'install($_) for qw( DBIx::Transaction File::Basename::Object )'
+4
source

Each module requires a separate command install:

perl -MCPAN -e 'install DBIx::Transaction; install File::Basename::Object'

If you want to simplify the installation process even further, look for cpanmone that does not require any configuration and will install modules by default without a hint.

You can install both modules with one command cpanmas follows:

cpanm DBIx::Transaction File::Basename::Object

, , , , , perl .

+6

All Articles