Skip to content

Commit 70727fb

Browse files
committed
generate.pl: Add patch for Time::Local on perls between 5.26 - 5.30
- #76 - Perl/perl5#17410 For current-supported perls, only 5.28 is affected.
1 parent b15d6d6 commit 70727fb

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

generate.pl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
use Devel::PatchPerl;
77
use LWP::Simple;
88

9+
use version 0.77;
10+
911
sub die_with_sample {
1012
die <<EOF;
1113
@@ -80,6 +82,9 @@ sub die_with_sample {
8082
<DATA>;
8183
};
8284

85+
# fetch Time-Local test patch for fixing failures upon entering year 2020
86+
my $time_local_patch = get 'https://rt.cpan.org/Public/Ticket/Attachment/1776857/956088/0001-Fix-Time-Local-tests.patch';
87+
8388
my %builds;
8489

8590
# sha256 taken from http://www.cpan.org/authors/id/M/MI/MIYAGAWA/CHECKSUMS
@@ -179,6 +184,14 @@ sub die_with_sample {
179184
print $fh $patch;
180185
}
181186

187+
# Install additional patch for Time::Local on perls between 5.26 to 5.30
188+
if ( version->parse("v$release->{version}") >= version->parse('v5.26.0')
189+
&& version->parse("v$release->{version}") < version->parse('v5.30.0'))
190+
{
191+
open my $fh, '>', "$dir/Fix-Time-Local-tests.patch";
192+
print $fh $time_local_patch;
193+
}
194+
182195
if (defined $release->{test_parallel} && $release->{test_parallel} eq "no") {
183196
$output =~ s/\{\{test\}\}/make test_harness/;
184197
}

0 commit comments

Comments
 (0)