diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-04-27 19:46:57 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-04-27 19:46:57 +0000 |
commit | 24944567cd431bac90d270c4c84c69294f9784d9 (patch) | |
tree | 126e4c88f0f364266fd45633bcf4a0c23e260b30 | |
parent | bf93d4cc8827842d1e2d40eecc0cc5927a17f3cd (diff) | |
download | perl-24944567cd431bac90d270c4c84c69294f9784d9.tar.gz |
change#4197 somehow missed initializing PL_errors, meaning
sytax error queueing wasn't working outside eval"" at all;
also fixed eval"" to localize PL_error_count, so that compile-time
eval's don't clobber the error state of the outer context
p4raw-link: @4197 on //depot/perl: 5a844595b9262407e093364ec4d29a22962723f0
p4raw-id: //depot/perl@5974
-rw-r--r-- | lib/Math/Complex.pm | 1 | ||||
-rw-r--r-- | perl.c | 1 | ||||
-rw-r--r-- | pp_ctl.c | 1 | ||||
-rw-r--r-- | t/pragma/warn/op | 2 | ||||
-rw-r--r-- | t/pragma/warn/toke | 6 |
5 files changed, 6 insertions, 5 deletions
diff --git a/lib/Math/Complex.pm b/lib/Math/Complex.pm index b13ab77f7a..f8040d5b87 100644 --- a/lib/Math/Complex.pm +++ b/lib/Math/Complex.pm @@ -1405,7 +1405,6 @@ sub stringify_polar { 1; __END__ -=pod =head1 NAME Math::Complex - complex numbers and associated mathematical functions @@ -276,6 +276,7 @@ perl_construct(pTHXx) PL_fdpid = newAV(); /* for remembering popen pids by fd */ PL_modglobal = newHV(); /* pointers to per-interpreter module globals */ + PL_errors = newSVpvn("",0); ENTER; } @@ -2762,6 +2762,7 @@ S_doeval(pTHX_ int gimme, OP** startop) SAVESPTR(PL_beginav); PL_beginav = newAV(); SAVEFREESV(PL_beginav); + SAVEI32(PL_error_count); /* try to compile it */ diff --git a/t/pragma/warn/op b/t/pragma/warn/op index 32f66dc5c1..2c9e0fdbed 100644 --- a/t/pragma/warn/op +++ b/t/pragma/warn/op @@ -603,7 +603,6 @@ my $a ; my @a = () ; my %a = () ; my $b = \@a ; my $c = \%a ; EXPECT Applying pattern match (m//) to @array will act on scalar(@array) at - line 5. Applying substitution (s///) to @array will act on scalar(@array) at - line 6. -Can't modify private array in substitution (s///) at - line 6, near "s/a/b/ ;" Applying transliteration (tr///) to @array will act on scalar(@array) at - line 7. Applying pattern match (m//) to @array will act on scalar(@array) at - line 8. Applying substitution (s///) to @array will act on scalar(@array) at - line 9. @@ -614,6 +613,7 @@ Applying transliteration (tr///) to %hash will act on scalar(%hash) at - line 13 Applying pattern match (m//) to %hash will act on scalar(%hash) at - line 14. Applying substitution (s///) to %hash will act on scalar(%hash) at - line 15. Applying transliteration (tr///) to %hash will act on scalar(%hash) at - line 16. +Can't modify private array in substitution (s///) at - line 6, near "s/a/b/ ;" BEGIN not safe after errors--compilation aborted at - line 18. ######## # op.c diff --git a/t/pragma/warn/toke b/t/pragma/warn/toke index cfdea78d3c..5aeef82b41 100644 --- a/t/pragma/warn/toke +++ b/t/pragma/warn/toke @@ -220,12 +220,12 @@ Reversed *= operator at - line 9. Reversed %= operator at - line 10. Reversed &= operator at - line 11. Reversed .= operator at - line 12. -syntax error at - line 12, near "=." Reversed ^= operator at - line 13. -syntax error at - line 13, near "=^" Reversed |= operator at - line 14. -syntax error at - line 14, near "=|" Reversed <= operator at - line 15. +syntax error at - line 12, near "=." +syntax error at - line 13, near "=^" +syntax error at - line 14, near "=|" Unterminated <> operator at - line 15. ######## # toke.c |