Make *{undef} self-consistent
authorFather Chrysostomos <sprout@cpan.org>
Fri, 26 Aug 2011 13:20:01 +0000 (06:20 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Fri, 26 Aug 2011 15:24:20 +0000 (08:24 -0700)
commitf132ae694cadce5cea5b006969b9b9ad169ecf64
tree17870ff80fdfd752b80df30ac27e24d22878bcc9
parenta12b8f3cd0656f16670bb2f2237cb55165d464e6
Make *{undef} self-consistent

Commit afd1915d made filehandle vivification work on hash and array
elements, but in doing so it accidentally changed

    *{;undef} = 3;

to do the same thing as

    *{""} = 3;

while leaving

    *{$some_undefined_variable}

an error.

This commit adjusts the if() conditions in S_rv2gv (formerly in
pp_rv2gv) in pp.c to make PL_sv_undef follow the same path as before.

It also removes the uninit tests from lib/warnings/pp, since they
are now errors.  The uninit warning in rv2gv is only triggered now
when it is implicit, as in close().  That is already tested in
lib/warnings/9uninit.
pp.c
t/lib/warnings/pp
t/op/gv.t