summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-01-20 23:40:23 +0000
committerNicholas Clark <nick@ccl4.org>2007-01-20 23:40:23 +0000
commitd9f30342f9de4793189d81b85a5e32057393e428 (patch)
treee0204e2a19983ec6fe2e13a6518faf3b19dbc4a2 /pp_hot.c
parenta36504e104c75cce0ab1c54edce368a9f9f9b78f (diff)
downloadperl-d9f30342f9de4793189d81b85a5e32057393e428.tar.gz
defined @$foo and defined %$bar should be subject to strict 'refs';
p4raw-id: //depot/perl@29900
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 5dd8104849..821f3b16b8 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -836,9 +836,15 @@ PP(pp_rv2av)
if (SvROK(sv))
goto wasref;
}
+ if (PL_op->op_private & HINT_STRICT_REFS) {
+ if (SvOK(sv))
+ DIE(aTHX_ PL_no_symref_sv, sv,
+ is_pp_rv2av ? an_array : a_hash);
+ else
+ DIE(aTHX_ PL_no_usym, is_pp_rv2av ? an_array : a_hash);
+ }
if (!SvOK(sv)) {
- if (PL_op->op_flags & OPf_REF ||
- PL_op->op_private & HINT_STRICT_REFS)
+ if (PL_op->op_flags & OPf_REF)
DIE(aTHX_ PL_no_usym, is_pp_rv2av ? an_array : a_hash);
if (ckWARN(WARN_UNINITIALIZED))
report_uninit(sv);
@@ -860,9 +866,6 @@ PP(pp_rv2av)
}
}
else {
- if (PL_op->op_private & HINT_STRICT_REFS)
- DIE(aTHX_ PL_no_symref_sv, sv,
- is_pp_rv2av ? an_array : a_hash);
gv = (GV*)gv_fetchsv(sv, GV_ADD, type);
}
}