summaryrefslogtreecommitdiff
path: root/lib/Module
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2009-02-14 13:08:33 -0600
committerCraig A. Berry <craigberry@mac.com>2009-02-14 13:40:34 -0600
commitcd5cc49dbc0e5ee748252c2da8b435855908e6d2 (patch)
tree0fd54cf107468d20a9dc503baeec73b7f312ab9a /lib/Module
parent9f937944c5272f2c948edeff3fe3a479bb7466a5 (diff)
downloadperl-cd5cc49dbc0e5ee748252c2da8b435855908e6d2.tar.gz
Clear Module::Build smoke on VMS while waiting for upstream.
Except for the version bump, this is the same as: https://rt.cpan.org/Public/Bug/Display.html?id=42724
Diffstat (limited to 'lib/Module')
-rw-r--r--lib/Module/Build.pm2
-rw-r--r--lib/Module/Build/Base.pm4
-rw-r--r--lib/Module/Build/Compat.pm2
-rw-r--r--lib/Module/Build/Platform/VMS.pm30
-rw-r--r--lib/Module/Build/t/compat.t2
5 files changed, 35 insertions, 5 deletions
diff --git a/lib/Module/Build.pm b/lib/Module/Build.pm
index 8ff3eab267..4f16ad676d 100644
--- a/lib/Module/Build.pm
+++ b/lib/Module/Build.pm
@@ -15,7 +15,7 @@ use Module::Build::Base;
use vars qw($VERSION @ISA);
@ISA = qw(Module::Build::Base);
-$VERSION = '0.31012';
+$VERSION = '0.31012_01';
$VERSION = eval $VERSION;
# Okay, this is the brute-force method of finding out what kind of
diff --git a/lib/Module/Build/Base.pm b/lib/Module/Build/Base.pm
index 95dfbbd0bd..f345274802 100644
--- a/lib/Module/Build/Base.pm
+++ b/lib/Module/Build/Base.pm
@@ -2817,7 +2817,7 @@ sub htmlify_pods {
my ($name, $path) = File::Basename::fileparse($pods->{$pod},
file_qr('\.(?:pm|plx?|pod)$'));
my @dirs = File::Spec->splitdir( File::Spec->canonpath( $path ) );
- pop( @dirs ) if $dirs[-1] eq File::Spec->curdir;
+ pop( @dirs ) if scalar(@dirs) && $dirs[-1] eq File::Spec->curdir;
my $fulldir = File::Spec->catfile($htmldir, @rootdirs, @dirs);
my $outfile = File::Spec->catfile($fulldir, "${name}.html");
@@ -4061,7 +4061,7 @@ sub install_map {
# Need to remove volume from $map{$_} using splitpath, or else
# we'll create something crazy like C:\Foo\Bar\E:\Baz\Quux
# VMS will always have the file separate than the path.
- my ($volume, $path, $file) = File::Spec->splitpath( $map{$_}, 1 );
+ my ($volume, $path, $file) = File::Spec->splitpath( $map{$_}, 0 );
# catdir needs a list of directories, or it will create something
# crazy like volume:[Foo.Bar.volume.Baz.Quux]
diff --git a/lib/Module/Build/Compat.pm b/lib/Module/Build/Compat.pm
index 328d0702d4..0da3b8caeb 100644
--- a/lib/Module/Build/Compat.pm
+++ b/lib/Module/Build/Compat.pm
@@ -279,7 +279,7 @@ sub fake_makefile {
my $Build = 'Build' . $filetype . ' --makefile_env_macros 1';
my $unlink = $class->oneliner('1 while unlink $ARGV[0]', [], [$args{makefile}]);
- $unlink =~ s/\$/\$\$/g;
+ $unlink =~ s/\$/\$\$/g unless $class->is_vmsish;
my $maketext = <<"EOF";
all : force_do_it
diff --git a/lib/Module/Build/Platform/VMS.pm b/lib/Module/Build/Platform/VMS.pm
index 2353e02e96..227bc147e9 100644
--- a/lib/Module/Build/Platform/VMS.pm
+++ b/lib/Module/Build/Platform/VMS.pm
@@ -188,6 +188,21 @@ sub do_system {
return !system("$cmd $args");
}
+=item oneliner
+
+Override to ensure that we do not quote the command.
+
+=cut
+
+sub oneliner {
+ my $self = shift;
+ my $oneliner = $self->SUPER::oneliner(@_);
+
+ $oneliner =~ s/^\"\S+\"//;
+
+ return "MCR $^X $oneliner";
+}
+
=item _infer_xs_spec
Inherit the standard version but tweak the library file name to be
@@ -309,6 +324,7 @@ sub _detildefy {
# Trivial case of just ~ by it self
if ($spec eq '') {
+ $home =~ s#/$##;
return $home;
}
@@ -385,6 +401,20 @@ sub localize_dir_path {
return VMS::Filespec::vmspath($path);
}
+=item ACTION_clean
+
+The home-grown glob() expands a bit too aggressively when given a bare name,
+so default in a zero-length extension.
+
+=cut
+
+sub ACTION_clean {
+ my ($self) = @_;
+ foreach my $item (map glob(VMS::Filespec::rmsexpand($_, '.;0')), $self->cleanup) {
+ $self->delete_filetree($item);
+ }
+}
+
=back
=head1 AUTHOR
diff --git a/lib/Module/Build/t/compat.t b/lib/Module/Build/t/compat.t
index d12898b841..0566ca7a34 100644
--- a/lib/Module/Build/t/compat.t
+++ b/lib/Module/Build/t/compat.t
@@ -230,7 +230,7 @@ ok $mb, "Module::Build->new_from_context";
ok $ran_ok, "make fakeinstall with INSTALLDIRS=vendor ran ok";
$output =~ s/^/# /gm; # Don't confuse our own test output
like $output,
- qr/\Q$libdir2\E .* Simple\.pm/x,
+ qr/\Q$libdir2\E .* Simple\.pm/ix,
'Should have installdirs=vendor';
stdout_of( sub { $mb->do_system(@make, 'realclean'); } );