diff options
author | Bram <perl-rt@wizbit.be> | 2008-05-24 05:34:22 -0700 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2008-06-01 19:32:34 +0000 |
commit | 1e21d011cd8eaa435798e00abe4c9c96270a5be5 (patch) | |
tree | 7bdc536004504b00b9b6c4f3116cb663398bd791 /pp.c | |
parent | a811a5cf5ba5b36dcbcd934066ae037d7f53f5ee (diff) | |
download | perl-1e21d011cd8eaa435798e00abe4c9c96270a5be5.tar.gz |
[perl #36875] [PATCH] scalar reverse undef does not warn (was: Certain string handling functions don't warn on undef)
From: "Bram via RT" <perlbug-followup@perl.org>
Message-ID: <rt-3.6.HEAD-11257-1211657660-1814.36875-15-0@perl.org>
p4raw-id: //depot/perl@33981
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -4604,13 +4604,18 @@ PP(pp_reverse) SvUTF8_off(TARG); /* decontaminate */ if (SP - MARK > 1) do_join(TARG, &PL_sv_no, MARK, SP); - else + else { sv_setsv(TARG, (SP > MARK) ? *SP : (padoff_du = find_rundefsvoffset(), (padoff_du == NOT_IN_PAD || PAD_COMPNAME_FLAGS_isOUR(padoff_du)) ? DEFSV : PAD_SVl(padoff_du))); + + if (! SvOK(TARG) && ckWARN(WARN_UNINITIALIZED)) + report_uninit(TARG); + } + up = SvPV_force(TARG, len); if (len > 1) { if (DO_UTF8(TARG)) { /* first reverse each character */ |