diff options
author | James E Keenan <jkeenan@cpan.org> | 2018-12-15 10:29:12 -0500 |
---|---|---|
committer | James E Keenan <jkeenan@cpan.org> | 2018-12-15 10:29:12 -0500 |
commit | c950d6fa306a1a0a1e28ece3646aec9490a7ea0e (patch) | |
tree | 5cdd89a92704b3e00deb0cd624d729257e78c751 /ext/GDBM_File | |
parent | c4df8c74c98b6ecac7f95d0184638f24f0a13bcc (diff) | |
download | perl-c950d6fa306a1a0a1e28ece3646aec9490a7ea0e.tar.gz |
Avoid "Use of uninitialized value $res in numeric eq (==)" warning
The test within the SKIP block expects $res to be undef, but the 'skip'
condition itself expects it to be defined and numeric. So we were
getting an uninitialized value warning. In 'skip' condition, test for
definedness before numeric comparison.
Diffstat (limited to 'ext/GDBM_File')
-rw-r--r-- | ext/GDBM_File/t/fatal.t | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/GDBM_File/t/fatal.t b/ext/GDBM_File/t/fatal.t index 01068f3cf4..1cbfdc6018 100644 --- a/ext/GDBM_File/t/fatal.t +++ b/ext/GDBM_File/t/fatal.t @@ -52,7 +52,7 @@ my $res = eval { }; SKIP: { - skip "Can't trigger failure", 2 if $res == 99; + skip "Can't trigger failure", 2 if (defined $res and $res == 99); is $res, undef, "eval should return undef"; |