Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Installing CPAN modules

by atcroft (Abbot)
on Jan 31, 2019 at 01:08 UTC ( [id://1229183]=note: print w/replies, xml ) Need Help??


in reply to Installing CPAN modules

For that matter, why not the following (using just the CPAN modules)?

# Almost no testing, so be warned... perl -Mstrict -Mwarnings -MCPAN -le ' CPAN::HandleConfig->load; CPAN::Shell::setup_output; CPAN::Index->reload; CPAN::HandleConfig::edit( q{prerequisites_policy follow}, ); my @tk_modules = grep { $_->id =~ m/^\bTk\b(?:::.*)?$/i; } CPAN::Shell->expand( q{Module}, q{/./}, ); foreach my $mod ( @tk_modules ) { print qq{Attempting install of }, $mod->id; CPAN::Shell->install($mod); } '

Hope that helps.

Update: 2019-01-30 - Changed regex from /^\bTk\b/i to /^\bTk\b(?:::.*)?$/i to get only Tk and Tk::* modules.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2024-04-16 12:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found