Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.99k stars 557 forks source link

toke.c: remove PERL_CR_FILTER #22787

Closed mauke closed 5 days ago

mauke commented 1 week ago

When enabled (e.g. with ./Configure -A ccflags=-DPERL_CR_FILTER), this would define an implicit source filter that turns \r\n pairs into \n whenever the parser reads a line of Perl source code.

As far as I can tell, perl already does the equivalent of this (without a source filter) on all platforms and has done so since 5.005.

(Also, the code could read out-of-bounds if the last character of the line read was a \r.)


mauke commented 1 week ago

probably could do with a note in perldelta though

Yeah, that's what I was sort of implying with

  • This set of changes requires a perldelta entry, and I need help writing it.

:-P

leonerd commented 6 days ago

As to perldelta content, I don't think a huge amount needs adding here. This is a little-known, probably entirely forgotten-about feature, that is being removed.

Maybe possible to combine it with the text about the removal of PERL_STRICT_CR.

mauke commented 6 days ago

perldelta entry added.