From 7497b91fbd38419c3d11a21866233566db7a3c10 Mon Sep 17 00:00:00 2001 From: Steve Hay Date: Fri, 20 Sep 2013 19:37:27 +0100 Subject: [PATCH] corelist.pl - Fix the addition of a new perl release following 9f92b9bec5 Now that the check is working, it was working slightly too well and actually picked up 5.019005 in the %delta because that had been added already and thus didn't add it to %released when it should have done! One simple fix is to move the processing of %released so that it's done first, which makes sense since it appears first in the file anyway. --- Porting/corelist.pl | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/Porting/corelist.pl b/Porting/corelist.pl index 7227be3..ea2d815 100755 --- a/Porting/corelist.pl +++ b/Porting/corelist.pl @@ -43,6 +43,19 @@ if ( !-f 'MANIFEST' ) { open( my $corelist_fh, '<', $corelist_file ); my $corelist = join( '', <$corelist_fh> ); +close $corelist_fh; + +unless ( + $corelist =~ /^%released \s* = \s* \( + .*? + $perl_vnum \s* => \s* .*? + \);/ismx + ) +{ + warn "Adding $perl_vnum to the list of released perl versions. Please consider adding a release date.\n"; + $corelist =~ s/^(%released \s* = \s* .*?) ( \) ) + /$1 $perl_vnum => '????-??-??',\n $2/ismx; +} if ($cpan) { my $modlistfile = File::Spec->catfile( $cpan, 'modules', '02packages.details.txt' ); @@ -283,18 +296,6 @@ $tracker .= ");"; $corelist =~ s/^%bug_tracker .*? ;/$tracker/eismx; -unless ( - $corelist =~ /^%released \s* = \s* \( - .*? - $perl_vnum \s* => \s* .*? - \);/ismx - ) -{ - warn "Adding $perl_vnum to the list of released perl versions. Please consider adding a release date.\n"; - $corelist =~ s/^(%released \s* = \s* .*?) ( \) ) - /$1 $perl_vnum => '????-??-??',\n $2/ismx; -} - write_corelist($corelist,$corelist_file); open( my $pod_fh, '<', $pod_file ); -- 2.7.4