summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-10-09 20:47:18 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-10-10 06:08:23 -0700
commit4505a31f43ca4e1a0e9203b389f6d4bebab9d899 (patch)
treef81c8a36f9bd6de6e852409144824f0ad58fd7df /gv.c
parent8f25f6c031ddddc08edd62173255cda84d4a05fd (diff)
downloadperl-4505a31f43ca4e1a0e9203b389f6d4bebab9d899.tar.gz
[perl #115206] Don’t crash when vivifying $|
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.
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gv.c b/gv.c
index f352452a35..cf02ca45ec 100644
--- a/gv.c
+++ b/gv.c
@@ -1913,10 +1913,6 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags,
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);
@@ -1957,6 +1953,7 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags,
case '>': /* $> */
case '\\': /* $\ */
case '/': /* $/ */
+ case '|': /* $| */
case '$': /* $$ */
case '\001': /* $^A */
case '\003': /* $^C */