summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbhijit Menon-Sen <ams@wiw.org>2001-06-12 23:05:55 +0530
committerJarkko Hietaniemi <jhi@iki.fi>2001-06-12 12:35:02 +0000
commita4268c0aeed5c62288abc420420bbe3d0436a5b6 (patch)
tree39242f2788d3c814365d34121dbc41b90bea3aae
parentaf9219eeb845660a7947f94064c62c7fc5ce5900 (diff)
downloadperl-a4268c0aeed5c62288abc420420bbe3d0436a5b6.tar.gz
$^S almost entirely broken with 5.6.1
Message-ID: <20010612173555.A32426@lustre.linux.in> p4raw-id: //depot/perl@10531
-rw-r--r--mg.c2
-rwxr-xr-xt/op/magic.t5
2 files changed, 6 insertions, 1 deletions
diff --git a/mg.c b/mg.c
index 6cd5f4f5ac..7230b0151d 100644
--- a/mg.c
+++ b/mg.c
@@ -581,6 +581,8 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg)
(void)SvOK_off(sv);
else if (PL_in_eval)
sv_setiv(sv, PL_in_eval & ~(EVAL_INREQUIRE));
+ else
+ sv_setiv(sv, 0);
}
break;
case '\024': /* ^T */
diff --git a/t/op/magic.t b/t/op/magic.t
index d71d6b299c..80b23f071f 100755
--- a/t/op/magic.t
+++ b/t/op/magic.t
@@ -27,7 +27,7 @@ $Is_os2 = $^O eq 'os2';
$Is_Cygwin = $^O eq 'cygwin';
$PERL = ($Is_MSWin32 ? '.\perl' : './perl');
-print "1..38\n";
+print "1..40\n";
eval '$ENV{"FOO"} = "hi there";'; # check that ENV is inited inside eval
if ($Is_MSWin32) { ok 1, `cmd /x /c set FOO` eq "FOO=hi there\n"; }
@@ -247,3 +247,6 @@ delete $INC{"Errno.pm"};
open(FOO, "nonesuch"); # Generate ENOENT
my %errs = %{"!"}; # Cause Errno.pm to be loaded at run-time
ok 38, ${"!"}{ENOENT};
+
+ok 39, $^S == 0;
+eval { ok 40, $^S };