Skip to content

Commit

Permalink
allow specifying alternate mirror urls
Browse files Browse the repository at this point in the history
  • Loading branch information
doy committed May 3, 2010
1 parent 145faf8 commit c387747
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions bin/cpan-outdated
Expand Up @@ -4,6 +4,7 @@ use warnings;
use Getopt::Long;
use Pod::Usage;
use ExtUtils::MakeMaker;
use File::Copy;
use File::Temp;
use File::Spec;
use Config;
Expand All @@ -12,15 +13,19 @@ use constant WIN32 => $^O eq 'MSWin32';

our $VERSION = "0.04";

my $index_url = 'http://www.cpan.org/modules/02packages.details.txt.gz';
my $mirror = 'http://www.cpan.org/';
my $quote = WIN32 ? q/"/ : q/'/;

GetOptions(
'h|help' => \my $help,
'verbose' => \my $verbose,
'h|help' => \my $help,
'verbose' => \my $verbose,
'm|mirror=s' => \$mirror,
) or pod2usage();
pod2usage() if $help;

$mirror =~ s:/$::;
my $index_url = "${mirror}/modules/02packages.details.txt.gz";

unless ($ENV{HARNESS_ACTIVE}) {
&main;
exit;
Expand Down Expand Up @@ -120,6 +125,11 @@ sub init_tools {
}
}

sub file_getstore {
my ($self, $uri, $path) = @_;
File::Copy::copy($uri, $path);
}

__END__
=head1 NAMES
Expand Down

0 comments on commit c387747

Please sign in to comment.