It was trying to read the currently-selected handle without checking
whether it was selected. It is actually not necessary to initialise
the variable this way, as the next use of get-magic on it will clobber
the cached value.
This initialisation was originally added in commit
d8ce0c9a45. The
bug it was fixing was probably caused by missing FETCH calls that are
no longer missing.
Perl_ck_warner_d(aTHX_ packWARN2(WARN_DEPRECATED, WARN_SYNTAX),
"$%c is no longer supported", *name);
break;
- case '|': /* $| */
- sv_setiv(GvSVn(gv), (IV)(IoFLAGS(GvIOp(PL_defoutgv)) & IOf_FLUSH) != 0);
- goto magicalize;
-
case '\010': /* $^H */
{
HV *const hv = GvHVn(gv);
case '>': /* $> */
case '\\': /* $\ */
case '/': /* $/ */
+ case '|': /* $| */
case '$': /* $$ */
case '\001': /* $^A */
case '\003': /* $^C */
chdir 't' if -d 't';
@INC = '../lib';
require './test.pl';
- plan (tests => 177);
+ plan (tests => 178);
}
# Test that defined() returns true for magic variables created on the fly,
# $|
fresh_perl_is 'print $| = ~$|', "1\n", {switches => ['-l']},
'[perl #4760] print $| = ~$|';
+fresh_perl_is
+ 'select f; undef *f; ${q/|/}; print STDOUT qq|ok\n|', "ok\n", {},
+ '[perl #115206] no crash when vivifying $| while *{+select}{IO} is undef';
# ^^^^^^^^^ New tests go here ^^^^^^^^^