AW: Pod::Simple can treat binary as pod due to liberal/inconsistent regexp patterns

2015-01-08 Thread Marek Rouchal
Right. Now I remember old threads where people would argue that POD parsers should do exactly the same as the Perl parser - and IIRC the conclusion was that using something like PPI to handle pathological cases like multiline strings or here docs would be an overkill, so POD is what starts with

Re: Assume CP1252

2015-01-08 Thread Ricardo Signes
* Grant McLean gr...@mclean.net.nz [2015-01-07T18:47:49] I also agree this is a good idea. None of the Latin-1 control characters that CP1252 replaces with printable characters should be appearing in POD anyway. Seems safe, I think. At first, I thought, They're disjunct!! but then I realized

Re: Pod::Simple can treat binary as pod due to liberal/inconsistent regexp patterns

2015-01-08 Thread Ricardo Signes
* David E. Wheeler da...@justatheory.com [2015-01-08T00:38:04] I agree that’s too liberal. I suggest /\A=([a-zA-Z]+\d*)\b/ trolling? Surely you want [0-9] instead of \d, lest we end up with =head୩ ! /trolling? -- rjbs signature.asc Description: Digital signature

Re: Pod::Simple can treat binary as pod due to liberal/inconsistent regexp patterns

2015-01-08 Thread Marek Rouchal
IIRC the first liberal rx is to detect start of POD just like the Perl (language) parser does, i.e. it pauses parsing for instructions until the next =cut I think POD parsers should do the same. If the matched pod-start sequence does not match any of the known commands, it's an error condition,

Re: Pod::Simple can treat binary as pod due to liberal/inconsistent regexp patterns

2015-01-08 Thread David E. Wheeler
On Jan 7, 2015, at 10:18 PM, Marek Rouchal ma...@rouchal.net wrote: IIRC the first liberal rx is to detect start of POD just like the Perl (language) parser does, i.e. it pauses parsing for instructions until the next =cut Oh. Can someone dig into the Perl parser and confirm this? I think

Allow Whitespace in L URLs?

2015-01-08 Thread David E. Wheeler
Poders, RT #93491 (https://rt.cpan.org/Ticket/Display.html?id=93491) reports that URLs are mis-formatted when they contain a newline. Turns out, the regex that detects a URL in L explicitly forbids whitespace: next unless $ell-[$_] =~ m/^(?:([^|]*)\|)?(\w+:[^:\s]\S*)$/s;

Re: Pod::Simple can treat binary as pod due to liberal/inconsistent regexp patterns

2015-01-08 Thread Karl Williamson
On 01/08/2015 11:17 AM, Randy Stauner wrote: IIRC the first liberal rx is to detect start of POD just like the Perl (language) parser does, i.e. it pauses parsing for instructions until the next =cut Oh. Can someone dig into the Perl parser and confirm this? I think POD parsers

Re: Allow Whitespace in L URLs?

2015-01-08 Thread Ricardo Signes
* David E. Wheeler da...@justatheory.com [2015-01-08T13:42:10] I think that is probably sane, but maybe there are other opinions? Should we allow whitespace in L URLs? If so, I think we would just change \S to . I didn't scrutinize the regexp (which is present in perlpodspec) closely, but URLs

Re: Allow Whitespace in L URLs?

2015-01-08 Thread David E. Wheeler
On Jan 8, 2015, at 1:00 PM, Ricardo Signes perl@rjbs.manxome.org wrote: I didn't scrutinize the regexp (which is present in perlpodspec) closely, but URLs may not contain unescape spaces, so I think there's no reason to allow it. Lfoo bar|http://baz-barshould be okay Lfoo

Re: Allow Whitespace in L URLs?

2015-01-08 Thread Shawn H Corey
On Thu, 8 Jan 2015 10:42:10 -0800 David E. Wheeler da...@justatheory.com wrote: I think that is probably sane, but maybe there are other opinions? Should we allow whitespace in L URLs? URLs use + or %20 for spaces. There is no need for whitespace in a URL. -- Don't stop where the ink does.