Make ‘require $tied_undef’ behave consistently
As of
f04d2c345 perl does not give uninitialized warnings for ‘require
undef’. But the check was not happening soon enough, causing tied
variables to behave erratically:
$ ./perl -Ilib -we 'sub TIESCALAR{bless[]}sub FETCH{undef}sub STORE{}tie $x,""; $x="a"; require $x'
Use of uninitialized value $x in require at -e line 1.
Missing or undefined argument to require at -e line 1.
(Uninit warning where muggle variables lack one.)
$ ./perl -Ilib -we 'sub TIESCALAR{bless[]}sub FETCH{undef}sub STORE{}tie $x,""; $x=3; require $x'
Invalid version format (non-numeric data) at -e line 1.
(undef being treated as a version string.)
We have to call get-magic on the argument before we check its
definedness.