Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Installing CPAN Modules within BEGIN of PERL Script

by bliako (Monsignor)
on Aug 19, 2021 at 12:30 UTC ( [id://11135960]=note: print w/replies, xml ) Need Help??


in reply to Installing CPAN Modules within BEGIN of PERL Script

I get the message that I already have the latest version.

Do you have multiple versions of Perl installed in your system? Then you would better make sure that CPAN::Shell looks at the right places. This will definetely be an issue in your (commented) code: #my $CPAN_Install    =    `cpan -I $_`; . Which cpan are you running through the OS default shell? A which cpan will tell in UNIXes. But anyway, that's commented out. So, it remains to debug CPAN::Shell and find out what the INC is. Perhaps adding CPAN::Shell->o('debug', 'all'); somewhere perhaps before the install loop will let you know what's going on. I tried your script in my system and it tried to install said modules but failed because of lack of admin privileges.

bw, bliako

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2024-04-24 10:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found