Skip Menu |

This queue is for tickets about the Pod-Parser CPAN distribution.

Report information
The Basics
Id: 14315
Status: resolved
Worked: 15 min
Priority: 0/
Queue: Pod-Parser

People
Owner: Nobody in particular
Requestors: smylers [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 1.30
  • 1.31
  • 1.32
Fixed in: 1.33



Subject: https URLs in Pod::ParseUtils
podchecker complains about this link: L<https://example.net/> like this: *** WARNING: node 'https://example.net/' contains non-escaped | or / at line 12 in file Donhost/RPC/Action/order_server.pm *** ERROR: unresolved internal link 'https://example.net/' at line 12 in file Donhost/RPC/Action/order_server.pm Donhost/RPC/Action/order_server.pm has 1 pod syntax error. The problem does not occur if the http: scheme is used instead of https:. The cause seems to be that Pod::ParseUtils doesn't recognize the https: scheme as being valid. I attach a patch which rectifies this, and recognizes https: everywhere http: is. However, the Pod spec says: Note that you can distinguish URL-links from anything else by the fact that they match m/\A\w+:[^:\s]\S*\z/. It is possibly better to use that 'official' regexp rather than attempt to maintain a list of all valid URL schemes. I have a second patch which does this instead, so you can choose which to apply. But 'RT' only seems to let me attach 1 file at once, so I'll upload that in a moment. Cheers. Smylers me attach one file. I'll
--- /usr/local/lib/perl5/5.8.6/Pod/ParseUtils.pm Tue Mar 8 12:26:34 2005 +++ ./ParseUtils.pm Thu Aug 25 16:53:22 2005 @@ -357,7 +357,7 @@ $type = 'item'; } # non-standard: Hyperlink - elsif(m!^((?:http|ftp|mailto|news):.+)$!i) { + elsif(m!^((?:https?|ftp|mailto|news):.+)$!i) { $node = $1; $type = 'hyperlink'; } @@ -371,7 +371,7 @@ ($alttext, $node) = ($1,$2); } # nonstandard: alttext and hyperlink - elsif(m!^(.*?)\s*[|]\s*((?:http|ftp|mailto|news):.+)$!) { + elsif(m!^(.*?)\s*[|]\s*((?:https?|ftp|mailto|news):.+)$!) { ($alttext, $node) = ($1,$2); $type = 'hyperlink'; }
Subject: Re: https URLs in Pod::ParseUtils
From: Smylers <smylers [...] cpan.org>
I just wrote: Show quoted text
> It is possibly better to use that 'official' regexp rather than > attempt to maintain a list of all valid URL schemes. > > I have a second patch which does this instead, so you can choose which > to apply. But 'RT' only seems to let me attach 1 file at once, so > I'll upload that in a moment.
Here it is! Smylers
--- /usr/local/lib/perl5/5.8.6/Pod/ParseUtils.pm Tue Mar 8 12:26:34 2005 +++ ./ParseUtils.pm Thu Aug 25 17:04:50 2005 @@ -357,7 +357,7 @@ $type = 'item'; } # non-standard: Hyperlink - elsif(m!^((?:http|ftp|mailto|news):.+)$!i) { + elsif(m!^(\w+:[^:\s]\S*)$!i) { $node = $1; $type = 'hyperlink'; } @@ -371,7 +371,7 @@ ($alttext, $node) = ($1,$2); } # nonstandard: alttext and hyperlink - elsif(m!^(.*?)\s*[|]\s*((?:http|ftp|mailto|news):.+)$!) { + elsif(m!^(.*?)\s*[|]\s*(\w+:[^:\s]\S*)$!) { ($alttext, $node) = ($1,$2); $type = 'hyperlink'; }