Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
‘%s found where op expected’ under fatal warnings
This is related to ticket #123195. This code: use warnings FATAL => 'all'; use strict; $foo; myfunc 1,2,3 __END__ was giving this: Global symbol "$foo" requires explicit package name (did you forget to declare "my $foo"?) at - line 3. (Do you need to predeclare myfunc?) syntax error at - line 4, near "myfunc 1" Execution of - aborted due to compilation errors. How can we have ‘Do you need to predeclare myfunc?’ without any prior mention of myfunc in the diagnostics? Fatal warnings were modified in 594b6fa to queue compile-time warning and emit them as part of the error message. But the logic was not quite right for yywarn, which is used for ‘foo found where operator expected’. The warning was just disappearing outside of an eval. qerror was treating PL_in_eval as a boolean, so we need to clear the flag we have just set, before we call it.
- Loading branch information