Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 12238
Status: rejected
Priority: 0/
Queue: Test-Pod

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

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Test::Pod doesn't catch C<<foo>>
perlpodspec sez: o A formatting code starts with a capital letter (just US-ASCII [A-Z]) followed by two or more "<"'s, one or more whitespace characters, any number of characters, one or more whitespace char- acters, and ending with the first matching sequence of two or more ">"'s, where the number of ">"'s equals the number of "<"'s in the opening of this formatting code. Which is to say C<< foo >> is legal but C<<foo>> is not. Test::Pod does not catch this mistake. I suspect the problem actually lies in Pod::Simple.
Forgot to attach the test I wrote.
diff -rN -u old-Test-Pod-1.20/t/bad.t new-Test-Pod-1.20/t/bad.t --- old-Test-Pod-1.20/t/bad.t 1969-12-31 16:00:00.000000000 -0800 +++ new-Test-Pod-1.20/t/bad.t 2005-04-10 22:53:07.000000000 -0700 @@ -0,0 +1,19 @@ +#!/usr/bin/perl -w + +use strict; + +use Test::Builder::Tester; +use Test::More; +my $TB = Test::More->builder; + +use Test::Pod; + +my @Files = all_pod_files("t/bad_pod"); +plan tests => scalar @Files; + +foreach my $file (@Files) { + my $test_num = $TB->current_test + 1; + test_out( "not ok $test_num - $file" ); + pod_file_ok( $file, $file ); + test_test("$file corrected failed POD test"); +} diff -rN -u old-Test-Pod-1.20/t/bad_pod/bad_double_bracket.pod new-Test-Pod-1.20/t/bad_pod/bad_double_bracket.pod --- old-Test-Pod-1.20/t/bad_pod/bad_double_bracket.pod 1969-12-31 16:00:00.000000000 -0800 +++ new-Test-Pod-1.20/t/bad_pod/bad_double_bracket.pod 2005-04-10 22:41:41.000000000 -0700 @@ -0,0 +1,22 @@ +=pod + +This is a pod file with errors. + +perlpodspec sez: + +A formatting code starts with a capital letter (just US-ASCII [A-Z]) +followed by two or more "<"'s, one or more whitespace characters, +any number of characters, one or more whitespace characters, +and ending with the first matching sequence of two or more ">"'s, where +the number of ">"'s equals the number of "<"'s in the opening of this +formatting code. Examples: + + That's what I<< you >> think! + + C<<< open(X, ">>thing.dat") || die $! >>> + + B<< $foo->bar(); >> + +So C<<< C<<foo>> >>> is illegal. Therefore the following POD is bad. + +C<<foo>>
On Mon Apr 11 01:56:31 2005, MSCHWERN wrote: Show quoted text
> Which is to say C<< foo >> is legal but C<<foo>> is not. Test::Pod does > not catch this mistake. I suspect the problem actually lies in Pod::Simple.
I made the appropriate changes to Pod::Simple to reflect this a while back, but I'm pretty sure that C<<foo>> is legal. It's just output as "<foo>" in plain text. The XHTML doesn't look right, though, coming out as "<code>&lt;foo</code>&gt;". But that's a bug in Pod::Simple, not Test::Pod. Want to file a new bug report? —David