Today's handy script

petdance on 2003-10-17T20:54:29

My ~bin/cpandl #!/usr/bin/perl -w

use strict; use LWP::Simple;

my $author = shift or die "Must specify an author\n"; my $distro = shift or die "Must specify a distro\n";

$distro .= ".tar.gz" unless $distro =~ /\.tar\.gz$/;

my $path = sprintf( "%sauthors/id/%1.1s/%2.2s/%s/%s", $ENV{CPAN}, $author, $author, $author, $distro );

warn "Getting $path\n"; my $resp = getstore( $path, $distro ); print $resp, "\n";
and then run as

andy@mook[~]$ cpandl GAAS libwww-perl-5.72 Getting ftp://pause.cpan.org/pub/PAUSE/authors/id/G/GA/GAAS/libwww-perl-5.72.tar.gz 200
Of course, if you're not pulling down latest-greatest tarballs 'cause you're a cpantester, you'll want to use a mirror...


cpanp

inkdroid on 2003-10-17T22:40:33

cpanp is handy too:
cpanp -d 'Acme::Test'

Re:cpanp

petdance on 2003-10-18T01:07:20

yes, but that relies on having the module list updated. In my case, I need to pull something down that just got uploaded.