diff options
author | Father Chrysostomos <sprout@cpan.org> | 2010-09-13 09:57:15 +0200 |
---|---|---|
committer | Rafael Garcia-Suarez <rgs@consttype.org> | 2010-09-13 09:57:58 +0200 |
commit | 526fd1b4d7270fff44588238f2411032c109da6e (patch) | |
tree | 0bcb1eeef2931a321b0a5c150e44f0fd71ff45dd /perlio.c | |
parent | 25222ff958727e01a3a480924b65ba188c7c3ea2 (diff) | |
download | perl-526fd1b4d7270fff44588238f2411032c109da6e.tar.gz |
[perl #77684] Restore the 5.10/12 behaviour of open $fh, ">", \$glob_copy
This restores the perl 5.10/12 behaviour, making open treat \$foo as a
scalar reference if it is a glob copy (SvFAKE).
It also fixes an existing assertion failure that the test now trig-
gers. PerlIOScalar_pushed was not downgrading the sv before set-
ting SvCUR.
Diffstat (limited to 'perlio.c')
-rw-r--r-- | perlio.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1449,7 +1449,7 @@ PerlIO_layer_from_ref(pTHX_ SV *sv) /* * For any scalar type load the handler which is bundled with perl */ - if (SvTYPE(sv) < SVt_PVAV && !isGV_with_GP(sv)) { + if (SvTYPE(sv) < SVt_PVAV && (!isGV_with_GP(sv) || SvFAKE(sv))) { PerlIO_funcs *f = PerlIO_find_layer(aTHX_ STR_WITH_LEN("scalar"), 1); /* This isn't supposed to happen, since PerlIO::scalar is core, * but could happen anyway in smaller installs or with PAR */ |