diff options
author | Craig A. Berry <craigberry@mac.com> | 2007-10-26 23:59:42 +0000 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2007-10-26 23:59:42 +0000 |
commit | 3143ec600f79205281fb493535fd6e6fe3615c9d (patch) | |
tree | 4c64ff7a3b5ee318a7e3a2bc025c1a922d57a97f | |
parent | 22aebd372b7cd8ef07838f9eee5351a3dd3bc241 (diff) | |
download | perl-3143ec600f79205281fb493535fd6e6fe3615c9d.tar.gz |
In the revised Module::Build, don't create temp directories
with dots in the names. Also, restore some VMS fixes
that regressed in the last integration.
p4raw-id: //depot/perl@32195
-rw-r--r-- | lib/Module/Build/t/destinations.t | 8 | ||||
-rw-r--r-- | lib/Module/Build/t/install.t | 2 | ||||
-rw-r--r-- | lib/Module/Build/t/lib/MBTest.pm | 2 | ||||
-rw-r--r-- | lib/Module/Build/t/manifypods.t | 4 | ||||
-rw-r--r-- | lib/Module/Build/t/xs.t | 2 |
5 files changed, 10 insertions, 8 deletions
diff --git a/lib/Module/Build/t/destinations.t b/lib/Module/Build/t/destinations.t index e3b4173146..b28abf5361 100644 --- a/lib/Module/Build/t/destinations.t +++ b/lib/Module/Build/t/destinations.t @@ -16,7 +16,7 @@ chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!"; use Config; -use File::Spec::Functions qw( catdir splitdir ); +use File::Spec::Functions qw( catdir splitdir splitpath ); ######################### @@ -300,10 +300,12 @@ sub have_same_ending { my ($dir1, $dir2, $message) = @_; $dir1 =~ s{/$}{} if $^O eq 'cygwin'; # remove any trailing slash - my @dir1 = splitdir $dir1; + my (undef, $dirs1, undef) = splitpath $dir1; + my @dir1 = splitdir $dirs1; $dir2 =~ s{/$}{} if $^O eq 'cygwin'; # remove any trailing slash - my @dir2 = splitdir $dir2; + my (undef, $dirs2, undef) = splitpath $dir2; + my @dir2 = splitdir $dirs2; is $dir1[-1], $dir2[-1], $message; } diff --git a/lib/Module/Build/t/install.t b/lib/Module/Build/t/install.t index 397dfe62d5..42fafc5d45 100644 --- a/lib/Module/Build/t/install.t +++ b/lib/Module/Build/t/install.t @@ -56,7 +56,7 @@ my $mb = Module::Build->new_from_context( ok $mb; -my $destdir = File::Spec->catdir($cwd, 't', 'install_test.' . $$); +my $destdir = File::Spec->catdir($cwd, 't', 'install_test' . $$); $mb->add_to_cleanup($destdir); { diff --git a/lib/Module/Build/t/lib/MBTest.pm b/lib/Module/Build/t/lib/MBTest.pm index 6764daf914..a2443b4d14 100644 --- a/lib/Module/Build/t/lib/MBTest.pm +++ b/lib/Module/Build/t/lib/MBTest.pm @@ -62,7 +62,7 @@ __PACKAGE__->export(scalar caller, @extra_exports); { # Setup a temp directory if it doesn't exist my $cwd = Cwd::cwd; - my $tmp = File::Spec->catdir( $cwd, 't', '_tmp.' . $$); + my $tmp = File::Spec->catdir( $cwd, 't', '_tmp' . $$); mkdir $tmp, 0777 unless -d $tmp; sub tmpdir { $tmp } diff --git a/lib/Module/Build/t/manifypods.t b/lib/Module/Build/t/manifypods.t index b3b8084c6c..b0c7328675 100644 --- a/lib/Module/Build/t/manifypods.t +++ b/lib/Module/Build/t/manifypods.t @@ -58,7 +58,7 @@ $dist->regen; chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!"; use File::Spec::Functions qw( catdir ); -my $destdir = catdir($cwd, 't', 'install_test.' . $$); +my $destdir = catdir($cwd, 't', 'install_test' . $$); my $mb = Module::Build->new( @@ -118,7 +118,7 @@ while (my ($from, $v) = each %distro) { next; } - my $to = File::Spec->catfile('blib', ($from =~ /^lib/ ? 'libdoc' : 'bindoc'), $v); + my $to = File::Spec->catfile('blib', ($from =~ /^[\.\/\[]*lib/ ? 'libdoc' : 'bindoc'), $v); ok $mb->contains_pod($from), "$from should contain POD"; ok -e $to, "Created $to manpage"; } diff --git a/lib/Module/Build/t/xs.t b/lib/Module/Build/t/xs.t index 2eb059571c..25e1759ec2 100644 --- a/lib/Module/Build/t/xs.t +++ b/lib/Module/Build/t/xs.t @@ -109,7 +109,7 @@ $dist->remove; # Try a XS distro with a deep namespace -$dist = DistGen->new( name => 'Simple::With::Deep::Namespace', +$dist = DistGen->new( name => 'Simple::With::Deep::Name', dir => $tmp, xs => 1 ); $dist->regen; chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!"; |