summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-09-23 08:09:55 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-09-23 08:09:55 +0000
commit9fbbe8258ee64b30ca2a9bd24c0177c1bc79aef6 (patch)
tree533ed75d490b65113c6143ac6f9be2eae093bdfb /op.c
parent9f3f8d509333a258cf0b421f6054067548d2733f (diff)
downloadperl-9fbbe8258ee64b30ca2a9bd24c0177c1bc79aef6.tar.gz
warn on C<my($foo,$foo)>
p4raw-id: //depot/perl@1835
Diffstat (limited to 'op.c')
-rw-r--r--op.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/op.c b/op.c
index 58cf51124f..9b2284db94 100644
--- a/op.c
+++ b/op.c
@@ -131,12 +131,11 @@ pad_allocmy(char *name)
for (off = AvFILLp(PL_comppad_name); off > PL_comppad_name_floor; off--) {
if ((sv = svp[off])
&& sv != &PL_sv_undef
- && SvIVX(sv) == 999999999 /* var is in open scope */
&& strEQ(name, SvPVX(sv)))
{
warner(WARN_UNSAFE,
- "\"my\" variable %s masks earlier declaration in same scope",
- name);
+ "\"my\" variable %s masks earlier declaration in same %s",
+ name, (SvIVX(sv) == 999999999 ? "scope" : "statement"));
break;
}
}