summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-03-18 21:44:34 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-03-18 21:44:34 +0000
commit8341b96b912f641681f822ceb6ec0b8b19720375 (patch)
tree6e5948b62086a5ee99d9ad74ce6c6f4b4e2bdbcc
parent23dcd6c8b343c4ac87d3915a222eed14cf6c153a (diff)
parentc7d6bfb246054926d9f90d7da2845febddfc90b7 (diff)
downloadperl-8341b96b912f641681f822ceb6ec0b8b19720375.tar.gz
Integrate with Sarathy.
p4raw-id: //depot/cfgperl@5809
-rw-r--r--t/pragma/strict-vars32
-rw-r--r--toke.c10
2 files changed, 40 insertions, 2 deletions
diff --git a/t/pragma/strict-vars b/t/pragma/strict-vars
index 954d1e5ab4..d0e82c4b1f 100644
--- a/t/pragma/strict-vars
+++ b/t/pragma/strict-vars
@@ -141,6 +141,38 @@ Compilation failed in require at - line 2.
BEGIN failed--compilation aborted at - line 2.
########
+--FILE-- abc.pm
+package Burp;
+use strict;
+$a = 1;$f = 1;$k = 1; # just to get beyond the limit...
+$b = 1;$g = 1;$l = 1;
+$c = 1;$h = 1;$m = 1;
+$d = 1;$i = 1;$n = 1;
+$e = 1;$j = 1;$o = 1;
+$p = 0b12;
+--FILE--
+use abc;
+EXPECT
+Global symbol "$f" requires explicit package name at abc.pm line 3.
+Global symbol "$k" requires explicit package name at abc.pm line 3.
+Global symbol "$g" requires explicit package name at abc.pm line 4.
+Global symbol "$l" requires explicit package name at abc.pm line 4.
+Global symbol "$c" requires explicit package name at abc.pm line 5.
+Global symbol "$h" requires explicit package name at abc.pm line 5.
+Global symbol "$m" requires explicit package name at abc.pm line 5.
+Global symbol "$d" requires explicit package name at abc.pm line 6.
+Global symbol "$i" requires explicit package name at abc.pm line 6.
+Global symbol "$n" requires explicit package name at abc.pm line 6.
+Global symbol "$e" requires explicit package name at abc.pm line 7.
+Global symbol "$j" requires explicit package name at abc.pm line 7.
+Global symbol "$o" requires explicit package name at abc.pm line 7.
+Global symbol "$p" requires explicit package name at abc.pm line 8.
+Illegal binary digit '2' at abc.pm line 8, at end of line
+abc.pm has too many errors.
+Compilation failed in require at - line 1.
+BEGIN failed--compilation aborted at - line 1.
+########
+
# Check scope of pragma with eval
no strict ;
eval {
diff --git a/toke.c b/toke.c
index a6d86c1ac2..c5637d3b31 100644
--- a/toke.c
+++ b/toke.c
@@ -7304,8 +7304,14 @@ Perl_yyerror(pTHX_ char *s)
Perl_warn(aTHX_ "%"SVf, msg);
else
qerror(msg);
- if (PL_error_count >= 10)
- Perl_croak(aTHX_ "%s has too many errors.\n", CopFILE(PL_curcop));
+ if (PL_error_count >= 10) {
+ if (PL_in_eval && SvCUR(ERRSV))
+ Perl_croak(aTHX_ "%_%s has too many errors.\n",
+ ERRSV, CopFILE(PL_curcop));
+ else
+ Perl_croak(aTHX_ "%s has too many errors.\n",
+ CopFILE(PL_curcop));
+ }
PL_in_my = 0;
PL_in_my_stash = Nullhv;
return 0;