summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-11-18 23:57:41 -0800
committerFather Chrysostomos <sprout@cpan.org>2011-11-19 00:02:39 -0800
commit290797f7dfbf93d204db5c34eebe2c81a615284f (patch)
tree5cbd300e11e9cec701d1ce7b96397985e6587a6e /pp.c
parent12d079942585f448cddf9b45ec18f8629001cc53 (diff)
downloadperl-290797f7dfbf93d204db5c34eebe2c81a615284f.tar.gz
Mention implicit $_ in y///r uninit warning
This brings it into conformity with y without the /r.
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/pp.c b/pp.c
index 99f08b9205..7011ecfc95 100644
--- a/pp.c
+++ b/pp.c
@@ -753,9 +753,11 @@ PP(pp_trans)
}
TARG = sv_newmortal();
if(PL_op->op_type == OP_TRANSR) {
- SV * const newsv = newSVsv(sv);
+ STRLEN len;
+ const char * const pv = SvPV(sv,len);
+ SV * const newsv = newSVpvn_flags(pv, len, SVs_TEMP|SvUTF8(sv));
do_trans(newsv);
- mPUSHs(newsv);
+ PUSHs(newsv);
}
else PUSHi(do_trans(sv));
RETURN;