diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-11-17 10:17:11 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-05-21 21:24:35 +0100 |
commit | dd9035cd5bdeced1187df399d27d526f3b30194b (patch) | |
tree | 82d333af765c5f828630ad2e51a66f0b38fc542c /op.c | |
parent | 223f0fb7579941d15c6185ada7e98fb53bf60852 (diff) | |
download | perl-dd9035cd5bdeced1187df399d27d526f3b30194b.tar.gz |
Restore strict refs on stashes, removed by ce10b5d1ec5b5f68b0811018a415bc37.
Strictures on stashes were special-cased, because the lexer was special-cased
to avoid autovivifying stashes (in adc51b978ed1b2e9d4512c9bfa80386ac917d05a,
now reverted), to keep the behaviour of defined %stash:: consistent.
defined %stash:: is deprecated.
Keep the new regression tests from ce10b5d1ec5b5f68b0811018a415bc37bb6bfe5e.
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 11 |
1 files changed, 0 insertions, 11 deletions
@@ -6747,17 +6747,6 @@ Perl_ck_rvconst(pTHX_ register OP *o) Perl_croak(aTHX_ "Constant is not %s reference", badtype); return o; } - else if ((o->op_type == OP_RV2HV || o->op_type == OP_RV2SV) && - (PL_hints & HINT_STRICT_REFS) && SvPOK(kidsv)) { - /* If this is an access to a stash, disable "strict refs", because - * stashes aren't auto-vivified at compile-time (unless we store - * symbols in them), and we don't want to produce a run-time - * stricture error when auto-vivifying the stash. */ - const char *s = SvPV_nolen(kidsv); - const STRLEN l = SvCUR(kidsv); - if (l > 1 && s[l-1] == ':' && s[l-2] == ':') - o->op_private &= ~HINT_STRICT_REFS; - } if ((o->op_private & HINT_STRICT_REFS) && (kid->op_private & OPpCONST_BARE)) { const char *badthing; switch (o->op_type) { |