summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorVincent Pit <perl@profvince.com>2009-05-26 16:56:39 +0200
committerVincent Pit <perl@profvince.com>2009-05-26 17:05:16 +0200
commit4f187fc91707286d3f695e2ea5e34351c2516fc6 (patch)
tree92045c00d37f5777afe61e05e6858bba6a632cac /sv.c
parent1710b4c094bcb01846632947bc64dce5d1c62def (diff)
downloadperl-4f187fc91707286d3f695e2ea5e34351c2516fc6.tar.gz
Explicitely point to $. when it causes an uninitialized warning for ranges in scalar context
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sv.c b/sv.c
index 1dad3cf4c6..9944724229 100644
--- a/sv.c
+++ b/sv.c
@@ -12984,6 +12984,14 @@ S_find_uninit_var(pTHX_ const OP *const obase, const SV *const uninit_sv,
Need a better fix at dome point. DAPM 11/2007 */
break;
+ case OP_FLIP:
+ case OP_FLOP:
+ {
+ GV * const gv = gv_fetchpvs(".", GV_NOTQUAL, SVt_PV);
+ if (gv && GvSV(gv) == uninit_sv)
+ return newSVpvs_flags("$.", SVs_TEMP);
+ goto do_op;
+ }
case OP_POS:
/* def-ness of rval pos() is independent of the def-ness of its arg */