From: Adrian M. Enache Date: Tue, 8 Apr 2003 07:12:13 +0000 (+0300) Subject: Re: Error: Unknown error X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7678c486bb9005aaaba9a0134efb395936e5a9f7;p=p5sagit%2Fp5-mst-13.2.git Re: Error: Unknown error Message-ID: <20030408041213.GA13553@ratsnest.hole> p4raw-id: //depot/perl@19170 --- diff --git a/lib/fields.t b/lib/fields.t index a505194..c4d5ef6 100755 --- a/lib/fields.t +++ b/lib/fields.t @@ -198,11 +198,11 @@ is( $Eval1::VERSION, 1.01 ); is( $Eval2::VERSION, 1.02 ); -eval q{use base reallyReAlLyNotexists;}; +eval q{use base 'reallyReAlLyNotexists'}; like( $@, qr/^Base class package "reallyReAlLyNotexists" is empty./, 'base with empty package'); -eval q{use base reallyReAlLyNotexists;}; +eval q{use base 'reallyReAlLyNotexists'}; like( $@, qr/^Base class package "reallyReAlLyNotexists" is empty./, ' still empty on 2nd load'); diff --git a/lib/strict.t b/lib/strict.t index 37bb4b3..b153771 100644 --- a/lib/strict.t +++ b/lib/strict.t @@ -74,7 +74,7 @@ for (@prgs){ `perl -I../lib $switch $tmpfile 2>&1` : $^O eq 'MacOS' ? `$^X -I::lib -MMac::err=unix $switch $tmpfile` : - `./perl $switch $tmpfile 2>&1`; + `$^X $switch $tmpfile 2>&1`; my $status = $?; $results =~ s/\n+$//; # allow expected output to be written as if $prog is on STDIN diff --git a/op.c b/op.c index af1fd08..39089fb 100644 --- a/op.c +++ b/op.c @@ -4191,7 +4191,7 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block) if (*s != 'B' && *s != 'E' && *s != 'C' && *s != 'I') goto done; - if (strEQ(s, "BEGIN")) { + if (strEQ(s, "BEGIN") && !PL_error_count) { I32 oldscope = PL_scopestack_ix; ENTER; SAVECOPFILE(&PL_compiling); diff --git a/t/lib/strict/subs b/t/lib/strict/subs index 4516de7..9e32909 100644 --- a/t/lib/strict/subs +++ b/t/lib/strict/subs @@ -361,3 +361,8 @@ print 1..1, bad; EXPECT Bareword "bad" not allowed while "strict subs" in use at - line 3. Execution of - aborted due to compilation errors. +######## +eval q{ use strict; no strict refs; }; +print $@; +EXPECT +Bareword "refs" not allowed while "strict subs" in use at (eval 1) line 1.