[Bast-commits] r4203 - in local-lib/1.000/trunk: . lib/local
matthewt at dev.catalyst.perl.org
matthewt at dev.catalyst.perl.org
Fri Mar 14 22:03:47 GMT 2008
Author: matthewt
Date: 2008-03-14 22:03:47 +0000 (Fri, 14 Mar 2008)
New Revision: 4203
Modified:
local-lib/1.000/trunk/Makefile.PL
local-lib/1.000/trunk/lib/local/lib.pm
Log:
Interpolation fixes for PERL5LIB, improve --bootstrap handling
Modified: local-lib/1.000/trunk/Makefile.PL
===================================================================
--- local-lib/1.000/trunk/Makefile.PL 2008-03-14 03:27:47 UTC (rev 4202)
+++ local-lib/1.000/trunk/Makefile.PL 2008-03-14 22:03:47 UTC (rev 4203)
@@ -3,8 +3,10 @@
use vars qw($bootstrapping);
BEGIN {
- if (grep { /^--bootstrap(?:=(.*))?$/ } @ARGV) {
+ if (my ($x) = grep { /^--bootstrap(?:=.*)?$/ } @ARGV) {
+ @ARGV = grep { !/^--bootstrap(?:=.*)?$/ } @ARGV;
$bootstrapping = 1;
+ $x =~ /^--bootstrap(?:=(.*))?$/;
my @args = (defined $1 ? ($1) : ());
$ENV{PERL_MM_USE_DEFAULT} = 1;
@@ -42,7 +44,7 @@
$cpan_command .= 'force("install","ExtUtils::MakeMaker"); ';
}
if ($cpan) {
- $cpan_command .= 'install("CPAN"); ';
+ $cpan_command .= 'force("install","CPAN"); ';
}
if(length $cpan_command) {
system($^X, '-MCPAN', '-e', $cpan_command);
Modified: local-lib/1.000/trunk/lib/local/lib.pm
===================================================================
--- local-lib/1.000/trunk/lib/local/lib.pm 2008-03-14 03:27:47 UTC (rev 4202)
+++ local-lib/1.000/trunk/lib/local/lib.pm 2008-03-14 22:03:47 UTC (rev 4203)
@@ -195,12 +195,12 @@
}
}
-sub INTERPOLATE_PATH () { 1 }
-sub LITERAL_PATH () { 0 }
+sub INTERPOLATE_ENV () { 1 }
+sub LITERAL_ENV () { 0 }
sub print_environment_vars_for {
my ($class, $path) = @_;
- my @envs = $class->build_environment_vars_for($path, LITERAL_PATH);
+ my @envs = $class->build_environment_vars_for($path, LITERAL_ENV);
my $out = '';
# rather basic csh detection, goes on the assumption that something won't
@@ -247,7 +247,7 @@
sub setup_env_hash_for {
my ($class, $path) = @_;
- my %envs = $class->build_environment_vars_for($path, INTERPOLATE_PATH);
+ my %envs = $class->build_environment_vars_for($path, INTERPOLATE_ENV);
@ENV{keys %envs} = values %envs;
}
@@ -259,10 +259,15 @@
PERL5LIB => join(':',
$class->install_base_perl_path($path),
$class->install_base_arch_path($path),
+ ($ENV{PERL5LIB} ?
+ ($interpolate == INTERPOLATE_ENV
+ ? ($ENV{PERL5LIB})
+ : ('$PERL5LIB'))
+ : ())
),
PATH => join(':',
$class->install_base_bin_path($path),
- ($interpolate == INTERPOLATE_PATH
+ ($interpolate == INTERPOLATE_ENV
? $ENV{PATH}
: '$PATH')
),
More information about the Bast-commits
mailing list