Is it possible to install multiple modules using CPAN? I've 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
One possible solution is to install libcgi-pm-perl , which currently replaces the default version by a supported one (2011-0-10). To do so, type sudo apt-get install libcgi-pm-perl from the command line or install it with your favorite package manager. Gentoo has ebuilds for the CPAN.
You need a separate install
command for each module:
perl -MCPAN -e 'install DBIx::Transaction; install File::Basename::Object'
If you want to simplify the install process even more, take a look at cpanm
, which requires no configuration and by default will install modules without prompting.
You can install both modules with a single cpanm
command like this:
cpanm DBIx::Transaction File::Basename::Object
Although as ikegami points out, this is not exactly the same as the first command since you can't specify which version of perl
to use.
cpan DBIx::Transaction File::Basename::Object
or if you're trying to make sure a specific perl
is used,
perl -MCPAN -e'install($_) for qw( DBIx::Transaction File::Basename::Object )'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With