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
clean up code handling various line endings in toke.c #4373
Comments
From crowell01@lightandmatter.com OK, I'm a Perl newbie, so forgive my audacity, but I think I use Perl on MacOS X, which can use both Unix and non-Unix newlines. I don't know for sure, but my guess is that it thinks the I don't know if it would be ridiculously hard to make Anyhow, I hope I'm not completely wasting your time here. Ben Crowell |
From p5p@spam.wizbit.beThis issue is not limited to Mac OS X. Example (on linux): $ echo -en 'print "1: " . __FILE__;\n# comment\nprint "2: " . $ echo -en 'print "1: " . __FILE__;\r\n# comment\r\nprint "2: " . $ echo -en 'print "1: " . __FILE__;\r# comment\rprint "2: " . (note the missing 2: Foo_r.pm line) |
From @jkeenanOn Tue Sep 04 14:29:26 2001, crowell01@lightandmatter.com wrote:
And then, on Fri Jul 25 14:37:08 2008, animator wrote:
1. Wouldn't it be more precise to say that this is the result of using $ echo -en 'print "1: " . __FILE__;\r# comment\rprint "2: " . [# be sure to run above without the formatting imposed by RT ] $ $ od -c Foo_r.pm $ view Foo_r.pm print "1: " . __FILE__;^M# comment^Mprint "2: " . __FILE__;^M;1;^M 2. Is this something we have to worry about these days? Thank you very much. |
From @cpansproutOn Thu Aug 08 17:02:52 2013, jkeenan wrote:
toke.c (the lexer) has a *lot* of code to handle precisely this. It It really does need to be cleaned up. Either we fix the code Anything dealing with line breaks and other whitespace in the lexer is It’s definitely a to-do item, and this ticket can represent that item. -- Father Chrysostomos |
@xenu says the only platform we ever supported that used \r for its line breaks was classic Mac, and that is no longer supported by Apple. So I think we can close this |
The most recent preceding comment from @cpansprout still seems relevant: if there's cleanup to do of code attempting to handle this, then either this ticket should be left open or a new ticket should be created for that cleanup. |
@hvds, if the code referenced by @cpansprout is ever going to be cleaned up, the discussion explaining that cleanup deserves its own ticket -- not a ticket opened more than 20 years ago. Would you be able to open such a ticket? (I will then put this one out of its misery.) Thank you very much. |
The message from @cpansprout on Aug 9, 2013 is pretty clear, I see no particular value in copying it to a new ticket, and even less value to divorcing it from the context that gave rise to it. There's some work to do here, but we're a volunteer organisation and it won't get done unless someone volunteers to do it. In the meantime it costs us very little to leave the ticket open - about the only way we can add value here is to change the subject of the ticket, so I've done that. |
Migrated from rt.perl.org#7624 (status was 'open')
Searchable as RT7624$
The text was updated successfully, but these errors were encountered: