Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 55 lines (45 sloc) 1.421 kB
# -*- cperl -*-
eval 'exec $CBROOT/bin/perl -w $0 ${1+"$@"}'
if my $running_under_some_shell;
use strict;
use warnings;
use File::Path qw(mkpath);
use Config;
my $root = $ENV{CBROOTLOCAL} or die "Need CBROOTLOCAL\n";
my $base = $root . q[/cpan];
my $arch_dir = $base . "/lib/perl5/" . $Config::Config{archname};
unless (-d $arch_dir) {
mkpath($arch_dir) || die "Cannot create $arch_dir: $!\n";
# Restart ourselves to get PERL5LIB setup
exec($0,@ARGV);
}
die "$base does not exists" unless -d $base;
use CPAN 1.9205;
require CPAN::MyConfig;
require CPAN::FirstTime;
$CPAN::Config->{makepl_arg} = q[INSTALL_BASE=] . $base . q[ INSTALLBASE=] . $base;
$CPAN::Config->{mbuildpl_arg} = q[--install_base ] . $base;
my $local_mirror = "$ENV{HOME}/src/cpan/mirror/";
$local_mirror = undef unless -d $local_mirror;
$local_mirror = $local_mirror && "file://$local_mirror";
# Should get this from config
$CPAN::Config->{urllist} = [
($local_mirror ? ($local_mirror) : ()),
'http://cpan.develooper.com',
'ftp://mirrors.kernel.org/pub/CPAN',
'http://cpan.mirrorgeek.com'
];
CPAN::FirstTime::init("/dev/null",
autoconfig => 1,
);
eval {
require Data::Dumper;
warn Data::Dumper::Dumper($CPAN::Config);
};
require CPAN;
if (@ARGV) {
CPAN::install(@ARGV);
}
else {
CPAN::shell();
}
Jump to Line
Something went wrong with that request. Please try again.