Author: kane
Date: Wed Oct 3 05:31:13 2007
New Revision: 10046
Modified:
CPANPLUS-Dist-Build/ (props changed)
CPANPLUS-Dist-Build/trunk/lib/CPANPLUS/Dist/Build.pm
CPANPLUS-Dist-Build/trunk/lib/CPANPLUS/Dist/Build/Constants.pm
CPANPLUS-Dist-Build/trunk/t/02_CPANPLUS-Dist-Build.t
Log:
[EMAIL PROTECTED]: josboum | 2007-10-02 10:58:24 +0200
* apply patches from John Malmberg, slightly reworked from his mail
to P5P from 3rd of Sep 2007: [EMAIL PROTECTED] fixes for cpanplus on VMS
* When accepted a new release should be rolled and integrated into core
Modified: CPANPLUS-Dist-Build/trunk/lib/CPANPLUS/Dist/Build.pm
==============================================================================
--- CPANPLUS-Dist-Build/trunk/lib/CPANPLUS/Dist/Build.pm (original)
+++ CPANPLUS-Dist-Build/trunk/lib/CPANPLUS/Dist/Build.pm Wed Oct 3
05:31:13 2007
@@ -640,7 +640,9 @@
### don't worry about loading the right version of M::B anymore
### the 'new_from_context' already added the 'right' path to
### M::B at the top of the build.pl
- my $cmd = [$perl, BUILD->($dir), 'install', $buildflags];
+ ### On VMS, flags need to be quoted
+ my $flag = ON_VMS ? '"install"' : 'install';
+ my $cmd = [$perl, BUILD->($dir), $flag, $buildflags];
my $sudo = $conf->get_program('sudo');
unshift @$cmd, $sudo if $sudo;
Modified: CPANPLUS-Dist-Build/trunk/lib/CPANPLUS/Dist/Build/Constants.pm
==============================================================================
--- CPANPLUS-Dist-Build/trunk/lib/CPANPLUS/Dist/Build/Constants.pm
(original)
+++ CPANPLUS-Dist-Build/trunk/lib/CPANPLUS/Dist/Build/Constants.pm Wed Oct
3 05:31:13 2007
@@ -18,9 +18,15 @@
? File::Spec->catdir($_[0], '_build')
: '_build';
};
-use constant BUILD => sub { return @_
+use constant BUILD => sub { my $file = @_
? File::Spec->catfile($_[0], 'Build')
: 'Build';
+
+ ### on VMS, '.com' is appended when
+ ### creating the Build file
+ $file .= '.com' if $^O eq 'VMS';
+
+ return $file;
};
1;
Modified: CPANPLUS-Dist-Build/trunk/t/02_CPANPLUS-Dist-Build.t
==============================================================================
--- CPANPLUS-Dist-Build/trunk/t/02_CPANPLUS-Dist-Build.t (original)
+++ CPANPLUS-Dist-Build/trunk/t/02_CPANPLUS-Dist-Build.t Wed Oct 3
05:31:13 2007
@@ -98,7 +98,7 @@
### set the fetch location -- it's local
{ my $where = File::Spec->rel2abs(
- File::Spec->catdir( $Src, $path, $mod->package )
+ File::Spec->catfile( $Src, $path, $mod->package )
);
$mod->status->fetch( $where );
@@ -232,13 +232,19 @@
my $file = File::Spec->catfile( split m/::/, $module );
my $candidate;
foreach (@INC) {
- if (-e ($candidate = File::Spec->catdir($_, $file))
+ if (-e ($candidate = File::Spec->catfile($_, $file))
or
- -e ($candidate = File::Spec->catdir($_, "$file.pm"))
+ -e ($candidate = File::Spec->catfile($_, "$file.pm"))
or
- -e ($candidate = File::Spec->catdir($_, 'auto', $file))
+ -e ($candidate = File::Spec->catfile($_, 'auto', $file))
or
- -e ($candidate = File::Spec->catdir($_, 'auto', "$file.pm"))) {
+ -e ($candidate = File::Spec->catfile($_, 'auto', "$file.pm"))
+ or
+ -e ($candidate = File::Spec->catfile($_, $Config{archname},
+ 'auto', $file))
+ or
+ -e ($candidate = File::Spec->catfile($_, $Config{archname},
+ 'auto', "$file.pm"))) {
return $candidate;
}
}