From: Abhijit Menon-Sen Date: Tue, 12 Jun 2001 17:35:55 +0000 (+0530) Subject: $^S almost entirely broken with 5.6.1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a4268c0aeed5c62288abc420420bbe3d0436a5b6;p=p5sagit%2Fp5-mst-13.2.git $^S almost entirely broken with 5.6.1 Message-ID: <20010612173555.A32426@lustre.linux.in> p4raw-id: //depot/perl@10531 --- diff --git a/mg.c b/mg.c index 6cd5f4f..7230b01 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 d71d6b2..80b23f0 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 };