summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--op.c1
-rwxr-xr-xt/op/subst.t2
2 files changed, 3 insertions, 0 deletions
diff --git a/op.c b/op.c
index 9b2284db94..b6e2499b42 100644
--- a/op.c
+++ b/op.c
@@ -131,6 +131,7 @@ 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 || SvIVX(sv) == 0)
&& strEQ(name, SvPVX(sv)))
{
warner(WARN_UNSAFE,
diff --git a/t/op/subst.t b/t/op/subst.t
index 81cafec75f..d224165b8f 100755
--- a/t/op/subst.t
+++ b/t/op/subst.t
@@ -1,5 +1,7 @@
#!./perl
+BEGIN { @INC = ('../lib') }
+
print "1..71\n";
$x = 'foo';