diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-01-20 23:40:23 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-01-20 23:40:23 +0000 |
commit | d9f30342f9de4793189d81b85a5e32057393e428 (patch) | |
tree | e0204e2a19983ec6fe2e13a6518faf3b19dbc4a2 /pp_hot.c | |
parent | a36504e104c75cce0ab1c54edce368a9f9f9b78f (diff) | |
download | perl-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.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -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); } } |