This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
parts/inc/ppphbin: Do calc once, and store in variable
authorKarl Williamson <khw@cpan.org>
Wed, 7 Aug 2019 01:05:28 +0000 (19:05 -0600)
committerNicolas R <atoomic@cpan.org>
Fri, 27 Sep 2019 22:51:27 +0000 (16:51 -0600)
(cherry picked from commit ef5acaa4d66699bbf87a9051192c1db82f79d406)
Signed-off-by: Nicolas R <atoomic@cpan.org>
dist/Devel-PPPort/parts/inc/ppphbin

index ee8bf89..bdbceac 100644 (file)
@@ -66,6 +66,8 @@ strip() if $opt{strip};
 $opt{'compat-version'} = __MIN_PERL__ unless exists $opt{'compat-version'};
 $opt{'compat-version'} = int_parse_version($opt{'compat-version'});
 
+my $int_min_perl = int_parse_version(__MIN_PERL__);
+
 # Each element of this hash looks something like:
 # 'Poison' => {
 #                         'base' => '5.008000',
@@ -98,7 +100,7 @@ if (exists $opt{'list-unsupported'}) {
     next if $API{$f}{inaccessible};
     next if $API{$f}{experimental};
     next unless $API{$f}{todo};
-    next if int_parse_version($API{$f}{todo}) <=  int_parse_version(__MIN_PERL__);
+    next if int_parse_version($API{$f}{todo}) <= $int_min_perl;
     print "$f ", '.'x(40-length($f)), " ", format_version($API{$f}{todo}), "\n";
   }
   exit 0;