This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Suppress confusing uninit warning from -T _
authorFather Chrysostomos <sprout@cpan.org>
Fri, 13 Jan 2012 22:26:19 +0000 (14:26 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 14 Jan 2012 05:24:54 +0000 (21:24 -0800)
commitde61bf2ac7b4130886e0d3b93c1f0e22b7dfaec3
treef99906f756d08ada7c7c40cada08834aac2f23a4
parent213084e431373aec68f094fabf7c87419d9c7688
Suppress confusing uninit warning from -T _

-T _ uses the file name saved by a preceding stat.  If there was no
preceding stat, the internal sv used to store the file name is unde-
fined, so SvPV producing an uninitialized warning.  Normally a failed
-T will just return undefined and set $!.  Normally stat on a filehan-
dle will set the internal stat file name to "".

This commit sets the internal file name to "" initially on startup,
instead of creating an undefined scalar.
perl.c
t/op/filetest.t