Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toke.c: remove PERL_CR_FILTER #22787

Merged
merged 2 commits into from
Nov 28, 2024
Merged

toke.c: remove PERL_CR_FILTER #22787

merged 2 commits into from
Nov 28, 2024

Conversation

mauke
Copy link
Contributor

@mauke mauke commented Nov 26, 2024

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.)


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

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.)
Copy link
Contributor

@leonerd leonerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM; probably could do with a note in perldelta though

@mauke
Copy link
Contributor Author

mauke commented Nov 27, 2024

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
Copy link
Contributor

leonerd commented Nov 27, 2024

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
Copy link
Contributor Author

mauke commented Nov 27, 2024

perldelta entry added.

Copy link
Contributor

@leonerd leonerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mauke mauke merged commit 342b57d into Perl:blead Nov 28, 2024
33 checks passed
@mauke mauke deleted the remove-perl-cr-filter branch November 28, 2024 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants