summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-11-12 17:19:48 +0000
committerNicholas Clark <nick@ccl4.org>2009-11-12 17:37:26 +0000
commit1456f9252e5c8bd47baf9395f629cf32d81766f1 (patch)
tree3911654b6546c9ef3ea81bd29b96d1ec2002c8a6 /op.c
parent6ec5370cb0aeb185d92b8fd2bad21bb10f75b30e (diff)
downloadperl-1456f9252e5c8bd47baf9395f629cf32d81766f1.tar.gz
As our $_; is forced into main::, it should warn as a redeclaration.
Diffstat (limited to 'op.c')
-rw-r--r--op.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/op.c b/op.c
index b1e8c902a2..dcecdb60c4 100644
--- a/op.c
+++ b/op.c
@@ -408,7 +408,7 @@ Perl_allocmy(pTHX_ const char *const name, const STRLEN len, const U32 flags)
/* check for duplicate declaration */
pad_check_dup(name, len, is_our ? pad_add_OUR : 0,
- (PL_curstash ? PL_curstash : PL_defstash));
+ (PL_curstash && !strEQ(name,"$_") ? PL_curstash : PL_defstash));
/* allocate a spare slot and store the name in that slot */