Skip Menu |

This queue is for tickets about the podlators CPAN distribution.

Report information
The Basics
Id: 117990
Status: resolved
Priority: 0/
Queue: podlators

People
Owner: RRA [...] cpan.org
Requestors: jgmiller [...] pt.LU
Cc:
AdminCc:

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



Subject: behavior of pod2man in pipeline changed
Somewhere between the pod2man version for per v5.20.2 and for perl v5.22.1, the behavior of pod2man in a pipeline has changed. Using a simple example, in the older version cat XXX_some_file_XXX | pod2man works just fine. In the newer version, pod2man complains IO::File=IO(0x9280284) around line 1: No name given for document (still generates the document though) BUT exits with 255 Using the --name SOME_DOCUMENT_NAME resolves the issue. cat XXX_some_file_XXX | pod2man --name MY_DOCUMENT Many software packages generate documentation with pod2man being used in an often times complex (usually involvind sed) pipeline and with input/output redirections to generate a manual page. So this means lots of software packages are going to have to start adding the --name SOME_DOCUMENT_NAME to their Makefile to overcome this issue. At the very least, something should be added to manual page and changelog file for pod2mand to now state that -name must be used if input file is not specified because of use of redirection or pipeline.
Subject: Re: [rt.cpan.org #117990] behavior of pod2man in pipeline changed
Date: Tue, 20 Sep 2016 10:48:32 -0700
To: "jgmiller\ [...] pt.LU via RT" <bug-podlators [...] rt.cpan.org>
From: Russ Allbery <rra [...] cpan.org>
"jgmiller@pt.LU via RT" <bug-podlators@rt.cpan.org> writes: Show quoted text
> Somewhere between the pod2man version for per v5.20.2 and for perl > v5.22.1, the behavior of pod2man in a pipeline has changed.
Yes, it was announced in the Changes file for the podlators distribution: [Pod::Man] Attempt to detect if the input came from a pipe and therefore has a completely unhelpful (and nonreproducible) source file name, and diagnose this as an error. Document that the name option (--name to pod2man) is required when processing POD source from standard input. (Debian Bug#777405) I'm sorry for how disruptive this change is. :( I couldn't figure out a better way of handling it other than creating a fake manual page name. Maybe in retrospect that would have been better? I suppose I could still do that to ease the pain. This is documented in the man page, although possibly not as prominantly as it should be: When converting POD source from standard input, this option is required, since there's otherwise no way to know what to use as the name of the manual page. You're not the first person to have been surprised by this. I think, in retrospect, I should just use something fake, like STDIN. I think I'll go ahead and make that change in the next release; backward compatibility is a feature. -- #!/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
Subject: Re: [rt.cpan.org #117990] behavior of pod2man in pipeline changed
Date: Tue, 20 Sep 2016 21:25:17 +0200
To: bug-podlators [...] rt.cpan.org
From: J G Miller <miller [...] yoyo.ORG>
Hi Russ, Thank you for your very quick response. At 13:48h, on Tuesday, September 20, 2016, in message <rt-4.0.18-15521-1474393735-1492.117990-6-0@rt.cpan.org>, on the subject of "Re: [rt.cpan.org #117990] behavior of pod2man in pipeline changed", you wrote - Show quoted text
> Yes, it was announced in the Changes file for the podlators distribution:
Aha, sorry I missed that and also I failed to scroll down to read all of the text for the --name option (doh!). What misled me (my incorrect assumption) was in the synopsis of the manual page that --name is still shown as optional, [--name=name] but maybe there is no convention or style for showing in the manual page synopsis that a command line option is sometimes mandatory. Show quoted text
> I'm sorry for how disruptive this change is. :(
Changes can never be made without some pain, and "no pain, no gain." ;+) So long as the word is out and people who provide packages are made aware, then the changeover can be achieved, but I think the problem is that maybe not enough people are aware. I came across the issue when trying to install the latest revision of stow from Github on Linux Mint 18 and thought something had got corrupted with my CPAN perl updates because it failed there but then I found that there was no problem on a Debian 8.6 system. I then found from a web search the solution provided by Robert Munteanu on Stackexchange who was trying to build a different Perl package but had encountered the same problem. <http://stackoverflow.COM/questions/38425732/pod2man-fails-with-no-name-given-for-document> Some testing then revealed that the failure with the newer version was due to pod2man being used in a pipeline. Show quoted text
> I think, in retrospect, I should just use something fake, like STDIN.
That sounds appropriate and a useful fix -- better to have something which is a compromise than causing builds (where the intermediate file name does not actually matter) to break unnecessarily. So as as this is a "feature" and not a bug, please feel free to close my ticket, but perhaps with a mention that a fix with using "STDIN" is being considered. Thanks for all the work you do in maintaining Perl and Debian packages, Greg
podlators 4.08 now silently uses STDIN as the name of man pages generated from standard input without the name option, and does not report an error.