Stop open fh, ">>", \$undef from warning
authorFather Chrysostomos <sprout@cpan.org>
Sat, 9 Nov 2013 21:44:27 +0000 (13:44 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 10 Nov 2013 01:02:17 +0000 (17:02 -0800)
commit7f7e7b583c6e4a7c1a86bc3badc65d1c15fe08d4
treea8ab6c8a3852694024316fec03b56b4e9c53ba8e
parentd6e9e7e3c67d8316e961f6f45f3e5bf8591ac8cc
Stop open fh, ">>", \$undef from warning

$ ./perl t/TEST ../cpan/Test-Simple/t/subtest/bail_out.t
t/../cpan/Test-Simple/t/subtest/bail_out ... Use of uninitialized value in open at /Users/sprout/Perl/perl.git-copy/cpan/Test-Simple/../../lib/Test/Builder.pm line 1895.
ok
All tests successful.
u=0.01  s=0.00  cu=0.09  cs=0.01  scripts=1  tests=2

Notice the uninitialized value.

$ ./perl -Ilib -Mwarnings=uninitialized -e 'open $fh, ">>", \$x'
Use of uninitialized value $x in open at -e line 1.
$ perl5.18.1 -Mwarnings=uninitialized -e 'open $fh, ">>", \$x'

I caused that in v5.19.5-44-g5a2bc23:

$ ../perl.git/Porting/bisect.pl --start=045071eede --end=blead -e 'use warnings FATAL=>"uninitialized"; open $fh, ">>", \$x'
...
5a2bc23bfe5dc60ff957cb44ffaa57668d56d238 is the first bad commit
commit 5a2bc23bfe5dc60ff957cb44ffaa57668d56d238
Author: Father Chrysostomos <sprout@cpan.org>
Date:   Fri Oct 25 06:15:30 2013 -0700

    Better fix for #119529
ext/PerlIO-scalar/scalar.xs
ext/PerlIO-scalar/t/scalar.t