This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
podcheck.t: Extract line numbers from strings properly
authorKarl Williamson <public@khwilliamson.com>
Mon, 23 May 2011 03:21:31 +0000 (21:21 -0600)
committerKarl Williamson <public@khwilliamson.com>
Mon, 23 May 2011 03:30:54 +0000 (21:30 -0600)
There was a typo in this regex.  I added a \b for good measure.
This bug was currently showing up on VMS-only, where a string
was getting returned instead of a hash.  And the regex that
deals with strings had a typo, so wasn't matching.

It remains to be seen if there is an underlying issue on VMS that
was causing this error, and other OSs don't have it.

t/porting/podcheck.t

index 6063462..7bf677c 100644 (file)
@@ -414,7 +414,7 @@ package My::Pod::Checker {      # Extend Pod::Checker
     # re's for messages that Pod::Checker outputs
     my $location = qr/ \b (?:in|at|on|near) \s+ /xi;
     my $optional_location = qr/ (?: $location )? /xi;
-    my $line_reference = qr/ [('"]? $optional_location line\
+    my $line_reference = qr/ [('"]? $optional_location \b line \s+
                              (?: \d+ | EOF | \Q???\E | - )
                              [)'"]? /xi;