[Bast-commits] r4082 - in local-lib/1.000/trunk: . lib/local
matthewt at dev.catalyst.perl.org
matthewt at dev.catalyst.perl.org
Thu Feb 14 16:24:46 GMT 2008
Author: matthewt
Date: 2008-02-14 16:24:45 +0000 (Thu, 14 Feb 2008)
New Revision: 4082
Modified:
local-lib/1.000/trunk/Changes
local-lib/1.000/trunk/Makefile.PL
local-lib/1.000/trunk/lib/local/lib.pm
Log:
better bootstrap
Modified: local-lib/1.000/trunk/Changes
===================================================================
--- local-lib/1.000/trunk/Changes 2008-02-14 12:24:45 UTC (rev 4081)
+++ local-lib/1.000/trunk/Changes 2008-02-14 16:24:45 UTC (rev 4082)
@@ -1,5 +1,7 @@
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}
Modified: local-lib/1.000/trunk/Makefile.PL
===================================================================
--- local-lib/1.000/trunk/Makefile.PL 2008-02-14 12:24:45 UTC (rev 4081)
+++ local-lib/1.000/trunk/Makefile.PL 2008-02-14 16:24:45 UTC (rev 4082)
@@ -7,6 +7,7 @@
$bootstrapping = 1;
my @args = (defined $1 ? ($1) : ());
+ $ENV{PERL_MM_USE_DEFAULT} = 1;
{
local @INC = @INC;
unshift(@INC, 'lib');
@@ -24,6 +25,17 @@
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
@@ -35,7 +47,9 @@
if(length $cpan_command) {
system($^X, '-MCPAN', '-e', $cpan_command);
}
-
+ if ($cpan) {
+ system($^X, '-MCPAN', '-e', 'CPAN::Config->load; CPAN::Config->commit;');
+ }
}
}
Modified: local-lib/1.000/trunk/lib/local/lib.pm
===================================================================
--- local-lib/1.000/trunk/lib/local/lib.pm 2008-02-14 12:24:45 UTC (rev 4081)
+++ local-lib/1.000/trunk/lib/local/lib.pm 2008-02-14 16:24:45 UTC (rev 4082)
@@ -309,13 +309,15 @@
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
More information about the Bast-commits
mailing list