use Config;
-use File::Spec::Functions qw( catdir splitdir );
+use File::Spec::Functions qw( catdir splitdir splitpath );
#########################
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;
}
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);
{
{ # 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 }
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(
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";
}
# 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]}': $!";