Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Programmatic way to get CPAN Module tarballs?

by Plankton (Vicar)
on Jan 13, 2010 at 17:29 UTC ( #817236=perlquestion: print w/replies, xml ) Need Help??

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

Dear Wise Monks

I want to automate the downloading of the .tar.gz install file for a list of CPAN Modules. This is easy for the module Algorithm::Interval2Prefix. Simply append Algorithm-Interval2Prefix to http://search.cpan.org/dist/ but this doesn't work other modules like Apache::Session::File. Is there some feature on the cpan.org website that I'm not aware of?

Thanks

  • Comment on Programmatic way to get CPAN Module tarballs?

Replies are listed 'Best First'.
Re: Programmatic way to get CPAN Module tarballs?
by ctilmes (Vicar) on Jan 13, 2010 at 17:43 UTC
    Try the CPAN module itself.

    CPAN::Distribution::get might do the trick.

      thanks! exactly what I needed!
        #!/usr/bin/perl -w use strict; use CPAN; my @cpanmods = qw / Algorithm::Interval2Prefix \ Apache::Session::File \ ... other modules go here XML::Generator /; for my $cpanmod ( @cpanmods ) { for my $mod (CPAN::Shell->expand("Module", $cpanmod )) { print "http://search.cpan.org/CPAN/authors/id/" . $mod +->{'RO'}{'CPAN_FILE'} . "\n"; } }
Re: Programmatic way to get CPAN Module tarballs?
by Anonymous Monk on Jan 13, 2010 at 17:44 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2022-10-03 18:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred way to holiday/vacation is:











    Results (15 votes). Check out past polls.

    Notices?