This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
devel/regenerate: Remove exists from if tests
authorKarl Williamson <khw@cpan.org>
Thu, 1 Aug 2019 22:40:06 +0000 (16:40 -0600)
committerNicolas R <atoomic@cpan.org>
Fri, 27 Sep 2019 22:39:32 +0000 (16:39 -0600)
I'm unsure as to why his is needed, but I found there were problems when
the code uses exists instead of just checking if the value is true.
This is a tiny hash, so autovivification isn't a performance issue at
all.

(cherry picked from commit 41457fa69251e60ddfce2e4f870a09a0115bfc6b)
Signed-off-by: Nicolas R <atoomic@cpan.org>
dist/Devel-PPPort/devel/regenerate

index e6e506a..4d81859 100755 (executable)
@@ -81,14 +81,14 @@ for my $dir (qw( base todo )) {
 
 my @perlargs;
 push @perlargs, "--debug" if $opt{debug};
-push @perlargs, "--install=$opt{install}" if exists $opt{install};
-push @perlargs, "--blead=$opt{blead}" if exists $opt{blead};
+push @perlargs, "--install=$opt{install}" if $opt{install};
+push @perlargs, "--blead=$opt{blead}" if $opt{blead};
 push @perlargs, "--debug-start=$opt{'debug-start'}" if $opt{'debug-start'};
 
 my $T0 = time;
 my @args = ddverbose();
 push @args, '--nocheck' unless $opt{check};
-push @args, "--blead-version=$opt{'blead-version'}" if exists $opt{'blead-version'};
+push @args, "--blead-version=$opt{'blead-version'}" if $opt{'blead-version'};
 push @args, @perlargs;
 
 # Find out what symbols were in what releases