This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1fcf106
)
Tweak on #8234 (Subject: Re: [PATCH] Warn on use of reference as array elem):
author
Jarkko Hietaniemi
<jhi@iki.fi>
Sun, 18 Feb 2001 19:44:25 +0000
(19:44 +0000)
committer
Jarkko Hietaniemi
<jhi@iki.fi>
Sun, 18 Feb 2001 19:44:25 +0000
(19:44 +0000)
don't warn on magical or overloaded things.
p4raw-id: //depot/perl@8834
pp_hot.c
patch
|
blob
|
blame
|
history
diff --git
a/pp_hot.c
b/pp_hot.c
index
ad6e333
..
36f5dbd
100644
(file)
--- 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;