Skip to content

Commit 5c307cb

Browse files
committed
cpan/ExtUtils-Install: sync in CPAN version 2.16
Then bring all files into compliance with strict-by-default. The version of EU-I we previously had, 2.14, suffered from a race condition. Patches were submitted to PTG for this problem but not released to CPAN (2.16) until it was too late to get them into perl-5.32.0. Hence, they were not part of Perl 7 at our initial branch point, alpha-00. In the last two days we got smoke-test failures due to the race condition. So to avoid misleading smoke test failure reports, let's pull in 2.16 and make it strict-compliant. Signed-off-by: James E Keenan <jkeenan@cpan.org>
1 parent 9ecd4bd commit 5c307cb

File tree

5 files changed

+266
-255
lines changed

5 files changed

+266
-255
lines changed

cpan/ExtUtils-Install/lib/ExtUtils/Install.pm

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ ExtUtils::Install - install files from here to there
3232
3333
=head1 VERSION
3434
35-
2.14
35+
2.16_001
3636
3737
=cut
3838

39-
our $VERSION = '2.14'; # <-- do not forget to update the POD section just above this line!
39+
our $VERSION = '2.16_001'; # <-- do not forget to update the POD section just above this line!
4040
$VERSION = eval $VERSION;
4141

4242
=pod
@@ -90,10 +90,10 @@ Dies with a special message.
9090
=cut
9191

9292
BEGIN {
93-
*Is_VMS = $^O eq 'VMS' ? sub(){1} : sub(){0};
94-
*Is_Win32 = $^O eq 'MSWin32' ? sub(){1} : sub(){0};
95-
*Is_cygwin = $^O eq 'cygwin' ? sub(){1} : sub(){0};
96-
*CanMoveAtBoot = ($^O eq 'MSWin32' || $^O eq 'cygwin') ? sub(){1} : sub(){0};
93+
*_Is_VMS = $^O eq 'VMS' ? sub(){1} : sub(){0};
94+
*_Is_Win32 = $^O eq 'MSWin32' ? sub(){1} : sub(){0};
95+
*_Is_cygwin = $^O eq 'cygwin' ? sub(){1} : sub(){0};
96+
*_CanMoveAtBoot = ($^O eq 'MSWin32' || $^O eq 'cygwin') ? sub(){1} : sub(){0};
9797
}
9898

9999
my $Inc_uninstall_warn_handler;
@@ -184,15 +184,15 @@ If $moan is true then returns 0 on error and warns instead of dies.
184184
sub _move_file_at_boot { #XXX OS-SPECIFIC
185185
my ( $file, $target, $moan )= @_;
186186
_confess("Panic: Can't _move_file_at_boot on this platform!")
187-
unless CanMoveAtBoot;
187+
unless _CanMoveAtBoot;
188188

189189
my $descr= ref $target
190190
? "'$file' for deletion"
191191
: "'$file' for installation as '$target'";
192192

193-
# *note* CanMoveAtBoot is only incidentally the same condition as below
193+
# *note* _CanMoveAtBoot is only incidentally the same condition as below
194194
# this needs not hold true in the future.
195-
$Has_Win32API_File = (Is_Win32 || Is_cygwin)
195+
$Has_Win32API_File = (_Is_Win32 || _Is_cygwin)
196196
? (eval {require Win32API::File; 1} || 0)
197197
: 0 unless defined $Has_Win32API_File;
198198
if ( ! $Has_Win32API_File ) {
@@ -282,7 +282,7 @@ sub _unlink_or_rename { #XXX OS-SPECIFIC
282282
my $error="$!";
283283

284284
_choke("Cannot unlink '$file': $!")
285-
unless CanMoveAtBoot && $tryhard;
285+
unless _CanMoveAtBoot && $tryhard;
286286

287287
my $tmp= "AAA";
288288
++$tmp while -e "$file.$tmp";
@@ -391,7 +391,7 @@ Abstract a -w check that tries to use POSIX::access() if possible.
391391
sub _have_write_access {
392392
my $dir=shift;
393393
unless (defined $has_posix) {
394-
$has_posix = (!Is_cygwin && !Is_Win32
394+
$has_posix = (!_Is_cygwin && !_Is_Win32
395395
&& eval { local $^W; require POSIX; 1} ) || 0;
396396
}
397397
if ($has_posix) {
@@ -437,7 +437,7 @@ sub _can_write_dir {
437437
my $path='';
438438
my @make;
439439
while (@dirs) {
440-
if (Is_VMS) {
440+
if (_Is_VMS) {
441441
$dir = File::Spec->catdir($vol,@dirs);
442442
}
443443
else {
@@ -822,7 +822,7 @@ sub install { #XXX OS-SPECIFIC
822822

823823
#XXX OS-SPECIFIC
824824
print "utime($atime,$mtime,$targetfile)\n" if $verbose>1;
825-
utime($atime,$mtime + Is_VMS,$targetfile) unless $dry_run>1;
825+
utime($atime,$mtime + _Is_VMS,$targetfile) unless $dry_run>1;
826826

827827

828828
$mode = 0444 | ( $mode & 0111 ? 0111 : 0 );
@@ -1094,7 +1094,7 @@ sub inc_uninstall {
10941094
#warn join "\n","---",@dirs,"---";
10951095
my $seen_ours;
10961096
foreach $dir ( @dirs ) {
1097-
my $canonpath = Is_VMS ? $dir : File::Spec->canonpath($dir);
1097+
my $canonpath = _Is_VMS ? $dir : File::Spec->canonpath($dir);
10981098
next if $canonpath eq $Curdir;
10991099
next if $seen_dir{$canonpath}++;
11001100
my $targetfile = File::Spec->catfile($canonpath,$libdir,$file);
@@ -1232,7 +1232,7 @@ sub pm_to_blib {
12321232
print "cp $from $to\n" unless $INSTALL_QUIET;
12331233
}
12341234
my($mode,$atime,$mtime) = (stat $from)[2,8,9];
1235-
utime($atime,$mtime+Is_VMS,$to);
1235+
utime($atime,$mtime+_Is_VMS,$to);
12361236
_chmod(0444 | ( $mode & 0111 ? 0111 : 0 ),$to);
12371237
next unless $from =~ /\.pm$/;
12381238
_autosplit($to,$autodir) if defined $autodir;
@@ -1285,7 +1285,7 @@ sub DESTROY {
12851285
$plural = $i>1 ? "all those files" : "this file";
12861286
my $inst = (_invokant() eq 'ExtUtils::MakeMaker')
12871287
? ( $Config::Config{make} || 'make' ).' install'
1288-
. ( ExtUtils::Install::Is_VMS ? '/MACRO="UNINST"=1' : ' UNINST=1' )
1288+
. ( ExtUtils::Install::_Is_VMS ? '/MACRO="UNINST"=1' : ' UNINST=1' )
12891289
: './Build install uninst=1';
12901290
print "## Running '$inst' will unlink $plural for you.\n";
12911291
}

cpan/ExtUtils-Install/lib/ExtUtils/Installed.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ my $DOSISH = ($^O =~ /^(MSWin\d\d|os2|dos|mint)$/);
1717
require VMS::Filespec if $Is_VMS;
1818

1919
use vars qw($VERSION);
20-
$VERSION = '2.14';
20+
$VERSION = '2.16_001';
2121
$VERSION = eval $VERSION;
2222

2323
sub _is_prefix {
@@ -309,7 +309,7 @@ sub version {
309309
return($self->{$module}{version});
310310
}
311311

312-
sub debug_dump {
312+
sub _debug_dump {
313313
my ($self, $module) = @_;
314314
$self= $self->new(default=>1) if !ref $self;
315315
local $self->{":private:"}{Config};

cpan/ExtUtils-Install/lib/ExtUtils/Packlist.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use strict;
55
use Carp qw();
66
use Config;
77
use vars qw($VERSION $Relocations);
8-
$VERSION = '2.14';
8+
$VERSION = '2.16_001';
99
$VERSION = eval $VERSION;
1010

1111
# Used for generating filehandle globs. IO::File might not be available!

0 commit comments

Comments
 (0)