Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

install multiple modules at once using CPAN

by ruqui (Acolyte)
on Aug 25, 2014 at 17:08 UTC ( [id://1098535]=perlquestion: print w/replies, xml ) Need Help??

ruqui has asked for the wisdom of the Perl Monks concerning the following question:

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

Replies are listed 'Best First'.
Re: install multiple modules at once using CPAN
by stefbv (Curate) on Aug 25, 2014 at 17:46 UTC

    Use the cpan script:

    % cpan DBIx::Transaction File::Basename::Object
Re: install multiple modules at once using CPAN
by jellisii2 (Hermit) on Aug 25, 2014 at 17:19 UTC
    DBIx::Transaction exists, so the first thing I'd ask after is "Can you install anything else via CPAN?" Full output from the CPAN transaction might be helpful.
      The problem happens when I try to install both modules in the same command, it works ok if I install them separately using two commands.

      I want to know if there's something wrong with the syntax I've used (see my first post), or the problem is that CPAN can't handle multiple installations at once.

        The problem is the syntax (see perlintro). Its like writing
        $ perl -le " print foo bar " Can't locate object method "foo" via package "bar" (perhaps you forgot + to load "bar"?) at -e line 1. $ perl -e "warn foo bar " Can't locate object method "foo" via package "bar" (perhaps you forgot + to load "bar"?) at -e line 1. $ perl -e "warn bar->foo " Can't locate object method "foo" via package "bar" (perhaps you forgot + to load "bar"?) at -e line 1.

        arguments to functions need to be seperated by commas, and strings should generally be quoted

        If you had quoted them

        And it says A comma is missing.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1098535]
Approved by Old_Gray_Bear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2024-04-20 03:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found