summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-02-18 19:44:25 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-02-18 19:44:25 +0000
commite35c1634452152a39827656efdfed4d3e0d18c71 (patch)
treefdeb94c49dbca54f7b9da9766523ef6a16fa2363 /pp_hot.c
parent1fcf10661eab113adba83b30ee600a6b3f37ba34 (diff)
downloadperl-e35c1634452152a39827656efdfed4d3e0d18c71.tar.gz
Tweak on #8234 (Subject: Re: [PATCH] Warn on use of reference as array elem):
don't warn on magical or overloaded things. p4raw-id: //depot/perl@8834
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp_hot.c b/pp_hot.c
index ad6e3338ff..36f5dbd74e 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2866,7 +2866,7 @@ PP(pp_aelem)
U32 defer = (PL_op->op_private & OPpLVAL_DEFER) && (elem > AvFILL(av));
SV *sv;
- if (SvROK(elemsv) && ckWARN(WARN_MISC))
+ if (SvROK(elemsv) && !SvGAMAGIC(elemsv) && ckWARN(WARN_MISC))
Perl_warner(aTHX_ WARN_MISC, "Use of reference \"%s\" as array index", SvPV_nolen(elemsv));
if (elem > 0)
elem -= PL_curcop->cop_arybase;