-
Notifications
You must be signed in to change notification settings - Fork 559
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: ----------- - 4fdae80 ("Make \r in script an error (per Larry)") - ff0cee6 ("Fix carriage-return message") - 5431012 ("Improve diagnostic on \r in program text") - 2db4f57 - f63a84b - 637e912 - b8957cf - 6a27c18
- Loading branch information
Showing
5 changed files
with
16 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters