This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
select() can return undef when defoutgv is set
authorFather Chrysostomos <sprout@cpan.org>
Sun, 25 Dec 2011 07:35:52 +0000 (23:35 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 25 Dec 2011 07:35:52 +0000 (23:35 -0800)
commit0df2568b7d017f31f412f393b443d798ed61602d
tree2bacfabdb7525b985583dfb1deff9344cf695799
parent204263bc1eb63f1dfd6180c05dca8cec2c319504
select() can return undef when defoutgv is set

If PL_defoutgv has been deleted from its stash, select() returns it
as a ref, but if the stash has been freed (even though the gv still
exists), it returns undef.

That makes no sense.

This is one of those nice cases where simplifying the code
fixes a bug.
pp_sys.c
t/op/select.t