Revision history for local::lib
+ - make bootstrap auto-init CPAN config and set USE_DEFAULT for deps
+
1.001000 2007-09-19
- refactored shell command generation
- implemented C shell command generation based on this (checks $SHELL}
$bootstrapping = 1;
my @args = (defined $1 ? ($1) : ());
+ $ENV{PERL_MM_USE_DEFAULT} = 1;
{
local @INC = @INC;
unshift(@INC, 'lib');
my $cpan = $? >> 8;
my $cpan_command = '';
+ system($^X, '-MCPAN', '-e',
+ 'CPAN::Config->load;
+ unless (-w $CPAN::Config->{keep_source_where}) {
+ $ENV{PERL_MM_USE_DEFAULT} = 0;
+ my $save = $CPAN::Config->{urllist};
+ delete @{$CPAN::Config}{keys %$CPAN::Config};
+ $CPAN::Config->{urllist} = $save;
+ CPAN::Config->init;
+ }'
+ );
+
# XXX - remove the force on EUMM once its test suite survive PERL_MM_OPT
if ($eumm) { # non-zero exit
if(length $cpan_command) {
system($^X, '-MCPAN', '-e', $cpan_command);
}
-
+ if ($cpan) {
+ system($^X, '-MCPAN', '-e', 'CPAN::Config->load; CPAN::Config->commit;');
+ }
}
}
To bootstrap if you don't have local::lib itself installed -
- $ perl -MCPAN -eshell # you only need to do this if you don't have a ~/.cpan
- cpan> exit
<download local::lib tarball from CPAN, unpack and cd into dir>
+
$ perl Makefile.PL --bootstrap
$ make test && make install
+
$ echo 'eval $(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)' >>~/.bashrc
+
# Or for C shells...
+
$ /bin/csh
% echo $SHELL
/bin/csh