Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background:
Before perl 5.004, the perl parser would skip over CR (carriage return) between tokens in source files, treating it as whitespace, but would retain CRs in quoted constructs such as multi-line strings and here-documents.
In 5.004, the behavior was changed to make CR in source files a fatal error ("Illegal character %s (carriage return)") to avoid surprises with unexpected literal CRs in string constants when scripts were copied from DOS/Windows without newline conversion.
In 5.005, the behavior changed again. Now CR was back to being ignored, but harder: Even in quoted constructs, CR was ignored when immediately followed by a newline. However, the 5.004 behavior could be restored by compiling perl with the
PERL_STRICT_CR
macro defined (e.g. with./Configure -A ccflags=-DPERL_STRICT_CR ...
). This option was undocumented except for a brief note in perl5005delta. (Also, the "Illegal character ..." error was changed to a warning, but perldiag wasn't updated and so still listed the message as "fatal" (F).)And that's how things have been ever since 1998.
Foreground:
This patch removes all checks for PERL_STRICT_CR entirely, treating it as always off.
Rationale: It simplifies the code and reduces clutter. (Plus I don't see the need to perpetually maintain an undocumented configuration option that enables compatibility with an ancient perl version used sometime around 1997-1998.)
References: