=head1 VERSION
-1.50_01
+1.51
=cut
my ( $file, $tryhard, $installing )= @_;
_chmod( 0666, $file );
- unlink $file
- and return $file;
+ my $unlink_count = 0;
+ while (unlink $file) { $unlink_count++; }
+ return $file if $unlink_count > 0;
my $error="$!";
_choke("Cannot unlink '$file': $!")
my $path='';
my @make;
while (@dirs) {
- $dir = File::Spec->catdir(@dirs);
- $dir = File::Spec->catpath($vol,$dir,'')
- if defined $vol and length $vol;
+ if ($Is_VMS) {
+ $dir = File::Spec->catdir($vol,@dirs);
+ }
+ else {
+ $dir = File::Spec->catdir(@dirs);
+ $dir = File::Spec->catpath($vol,$dir,'')
+ if defined $vol and length $vol;
+ }
next if ( $dir eq $path );
if ( ! -e $dir ) {
unshift @make,$dir;
#warn join "\n","---",@dirs,"---";
my $seen_ours;
foreach $dir ( @dirs ) {
- my $canonpath = File::Spec->canonpath($dir);
+ my $canonpath = $Is_VMS ? $dir : File::Spec->canonpath($dir);
next if $canonpath eq $Curdir;
next if $seen_dir{$canonpath}++;
my $targetfile = File::Spec->catfile($canonpath,$libdir,$file);
eval {
die "Fake die for testing"
if $ExtUtils::Install::Testing and
- File::Spec->canonpath($ExtUtils::Install::Testing) eq $targetfile;
+ ucase(File::Spec->canonpath($ExtUtils::Install::Testing)) eq ucase($targetfile);
forceunlink($targetfile,'tryhard');
$results->{uninstall}{$targetfile} = $filepath;
1;
}
$plural = $i>1 ? "all those files" : "this file";
my $inst = (_invokant() eq 'ExtUtils::MakeMaker')
- ? ( $Config::Config{make} || 'make' ).' install UNINST=1'
+ ? ( $Config::Config{make} || 'make' ).' install'
+ . ( $Is_VMS ? '/MACRO="UNINST"=1' : ' UNINST=1' )
: './Build install uninst=1';
print "## Running '$inst' will unlink $plural for you.\n";
}
ok( -d 'install-test/other_lib/perl', 'install made other dir' );
ok( -r 'install-test/other_lib/perl/Big/Dummy.pm', ' .pm file installed' );
ok( -r 'install-test/packlist', ' packlist exists' );
- ok( (stat $tfile)[9]==(stat$sfile)[9],' Times are same');
+SKIP: {
+ skip "Times not preserved during copy by default", 1 if $^O eq 'VMS';
+ ok( (stat $tfile)[9]==(stat $sfile)[9],' Times are same');
+}
ok( !$result{install_unchanged},' $result{install_unchanged} should be empty');
}
# Test nothing is copied.
ok( (stat $tfile)[9]!=(stat$sfile)[9],' Times are different');
ok( !$result{install},' nothing should have been installed');
ok( $result{install_unchanged},' install_unchanged should be populated');
-}
\ No newline at end of file
+}