Skip Menu |
 

This queue is for tickets about the podlators CPAN distribution.

Report information
The Basics
Id: 129091
Status: rejected
Priority: 0/
Queue: podlators

People
Owner: RRA [...] cpan.org
Requestors: ulrich.windl [...] rz.uni-regensburg.de
Cc:
AdminCc:

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



Subject: Wtrlt: pod2man: Expected text after =item, not a number
Date: Tue, 09 Apr 2019 08:00:33 +0200
To: "bug-podlators [...] rt.cpan.org" <bug-podlators [...] rt.cpan.org>
From: "Ulrich Windl" <Ulrich.Windl [...] rz.uni-regensburg.de>
Download (untitled) / with headers
text/plain 1.9k
Forwarding per request from "[perl #134006] pod2man: Expected text after =item, not a number": Show quoted text
>>> Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> schrieb am 08.04.2019 um 12:48
in Nachricht <5CAC50EA.ED38.00A1.0@rz.uni-regensburg.de>: Show quoted text
> After upgrading Perl, I realized that my POD that was valid in Perl 5.10.0 is > no longer valid in perl-5.18.2: > I'm getting error messages from pod2man like this: > Expected text after =item, not a number > > The POD part that causes the error looks like this: > --- > Numbers are post-processed depending on I<num>: > > =over > > =item 0 > > Absolute: No post-processing is done, and numbers are output as read. > > =item 1 > > Delta: The difference between the values read and the corresponding last > values are output. > > =item 2 > > Rate: The difference between the values read and the corresponding last > values > divided by the age of the corresponding last values in seconds are output. > > =back > --- > > Also, according to man perlpodspec this is allowed: > "=item" > This command indicates that an item in a list begins here. > Formatting codes are processed. The semantics of the (optional) > text in the remainder of this paragraph are explained in the > "About > =over...=back Regions" section, further below. Examples: > > =item > > =item * > > =item * > > =item 14 > > =item 3. > > =item C<< $thing->stuff(I<dodad>) >> > > =item For transporting us beyond seas to be tried for pretended > offenses > > =item He is at this time transporting large armies of foreign > mercenaries to complete the works of death, desolation and > tyranny, already begun with circumstances of cruelty and > perfidy > scarcely paralleled in the most barbarous ages, and totally > unworthy the head of a civilized nation. > > >
Subject: Re: [rt.cpan.org #129091] Wtrlt: pod2man: Expected text after =item, not a number
Date: Tue, 09 Apr 2019 09:26:24 -0700
To: "Ulrich Windl via RT" <bug-podlators [...] rt.cpan.org>
From: Russ Allbery <rra [...] cpan.org>
"Ulrich Windl via RT" <bug-podlators@rt.cpan.org> writes: Show quoted text
>> After upgrading Perl, I realized that my POD that was valid in Perl >> 5.10.0 is no longer valid in perl-5.18.2: I'm getting error messages >> from pod2man like this: Expected text after =item, not a number
Show quoted text
>> The POD part that causes the error looks like this: >> --- >> Numbers are post-processed depending on I<num>: >> >> =over >> >> =item 0 >> >> Absolute: No post-processing is done, and numbers are output as read.
This is a change in Pod::Simple compared to pre-Pod::Simple POD parsing (so this isn't the correct RT queue, but it's an intentional change so I'm not sure it matters). This POD used to silently render incorrectly in HTML; the warning was added to avoid that. (You would have never noticed a difference with man page output, since it doesn't have the motivating problem.) The root cause is that any =item tag that looks like a number is turned into a numeric list during HTML conversion, but that numeric list is renumbered in HTML, so in HTML your POD would have been interpreted as having items 1, 2, and 3 (which would be very confusing). You don't actually want a numeric list here, so you need to force the =item tags to be strings. This is where POD's free-form nature kind of gets in its way, since it does a lot of guesswork and those look like numbers. The best fix is to add Z<> after (or before) each number: =item 0Z<> =item 1Z<> =item 2Z<> which will force them to be interpreted as strings with no change in the output, and thus force the HTML output into a definition list. This is also backward-compatible to older versions of pod2man and the underlying parser. You unfortunately need to do this with any =item tags that look like numbers but shouldn't be turned into a numbered list with strictly-increasing numbers starting from 1. -- #!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker $^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD, 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{ rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
Download (untitled) / with headers
text/plain 258b
Closing this out as not a bug per the previous explanation, although if you disagree, reporting a bug against Pod-Simple to ask for different behavior is probably the best way forward. (But this would require figuring out what behavior to replace this with.)


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.