# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #122891] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=122891 >
<jnthn> m: say "a\n" ~~ /^^\s*$$/ <camelia> rakudo-moar d69a87: OUTPUT«Nil» <jnthn> m: say "a\r\n" ~~ /^^\s*$$/ <camelia> rakudo-moar d69a87: OUTPUT«「」» <jnthn> That's why Pod tables are bust on Windows. <masak> jnthn: that looks clearly wrong to me. <masak> \r\n are whitespace. <jnthn> masak: That's not the problem <jnthn> masak: The problem is that it doesn't match, so then goes right one char <jnthn> masak: Then ^^ says "oh, I'm after a \r, that'll do", and $$ says "oh, I'm before a \n, that'll do" <masak> oh! <masak> ...wow. <jnthn> Yeah... o.O <jnthn> And given \r actually *is* a valid line sep on...older mac...or something... <jnthn> I don't immediately know what to do about it. <jnthn> For now, it's easy to patch the Pod code, since it's already dealing with full lines always <lizmat> this is a similar problem with .lines <jnthn> So its use of ^^ and $$ is kinda overkill; if you already know you have a line, ^ and $ are good enough <jnthn> But yeah, there is a deeper issue here <masak> yes, \r was the newline marker on Mac OS 9. <FROGGS[mobile]> I'd think that ^^ would "gobble" \r\n already <jnthn> FROGGS[mobile]: ^^ and $$ don't swallow <jnthn> They're zero-width assertions <masak> jnthn: I think a reasonable expectation is that if you *have* a single line, ^ and $ should act as ^^ and $$, respectively. <jnthn> masak: Yes, sounds sane. Question is how we get there ;) <jnthn> Anyway, I'm going to do the wrokaround in Pod.pm so that we don't have Pod-parsing bugs on Windows. <jnthn> And the ^^$$ issue probably deserves an RT. * masak submits one <masak> does it make sense to ask "how does Perl 5 regexes handle this one?" ? <jnthn> masak: Maybe... :)