That bug happens when we detect a compilation error in the statement
being parsed, and when the continuation of the parsing of that same
statement needs to load the file unicore/Name.pl via charnames.pm.
In that case perl gets confused, fails to parse Name.pl because
the parser is already in error, and also fails to properly rewind
to a normal error-reporting state.
This patch does not attempt to fix the whole error-reporting process;
instead, it simply prevents perl from trying to load charnames if it has
already recorded a parse error. So, in a way, it hides the bug under
the carpet. However, this is a safe fix, suitable for a code-freeze
stage.
if ( he_str ) {
sv_str = HeVAL(he_str);
cached = 1;
+ } else if (PL_parser && PL_parser->error_count > 0) {
+ /* Don't attempt to load charnames if we're already in error */
+ vFAIL("Too many errors, cannot continue parsing");
} else {
dSP ;