diff options
author | Adrian M. Enache <enache@rdslink.ro> | 2003-04-08 10:12:13 +0300 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2003-04-08 19:47:05 +0000 |
commit | 7678c486bb9005aaaba9a0134efb395936e5a9f7 (patch) | |
tree | a14c4408ef5ecb1a0dd715897c93c0baee53e3f3 | |
parent | 27308ded152a902d86f6f5763883d26b257e257a (diff) | |
download | perl-7678c486bb9005aaaba9a0134efb395936e5a9f7.tar.gz |
Re: Error: Unknown error
Message-ID: <20030408041213.GA13553@ratsnest.hole>
p4raw-id: //depot/perl@19170
-rwxr-xr-x | lib/fields.t | 4 | ||||
-rw-r--r-- | lib/strict.t | 2 | ||||
-rw-r--r-- | op.c | 2 | ||||
-rw-r--r-- | t/lib/strict/subs | 5 |
4 files changed, 9 insertions, 4 deletions
diff --git a/lib/fields.t b/lib/fields.t index a5051947b6..c4d5ef61a8 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 37bb4b350b..b153771cb7 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 @@ -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 4516de7be3..9e329091fc 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. |