Skip Menu |

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

Maintainer(s)' notes

Please use Github for all future tickets, patches and pull requests: https://github.com/Dual-Life/Pod-Usage

Thanks to Nicolas R (ATOOMIC) for setting up everything there!

Report information
The Basics
Id: 102116
Status: resolved
Worked: 35 min
Priority: 0/
Queue: Pod-Usage

People
Owner: Marek.Rouchal [...] gmx.net
Requestors: karl [...] freefriends.org
Cc:
AdminCc:

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



Subject: pod2usage() -sections omits section with subsection specified
Date: Sat, 14 Feb 2015 00:17:49 GMT
To: bug-Pod-Usage [...] rt.cpan.org
From: karl [...] freefriends.org (Karl Berry)
Hi Marek or all - (very glad to hear about the fix for #101581, thanks!) Here's another (smaller issue, I hope) problem report with pod2usage. Running this small self-contained program, including a little pod at the end: -------------------------------------------------- #!/usr/bin/env perl use Pod::Usage; pod2usage(-exitstatus => 0, -verbose => 99, -sections => "NAME|ACTIONS/help", -noperldoc => 1); 1; __END__ =head1 NAME trypodi - pod sections usage test =head1 ACTIONS Para for actions. =head2 help Help text. -------------------------------------------------- gives me this unexpected output, with the NAME section missing: -------------------------------------------------- help: Help text. -------------------------------------------------- That is, I'm trying to use -sections to select both the NAME section and the /help/ subsection of ACTIONS. As far as I can tell from the doc (http://perldoc.perl.org/Pod/Usage.html), this sort of selection is intended to work. This was on i686-linux with perl 5.20.1, compiled (with gcc 4.9.2) and installed from the original source; Pod/Usage.pm has $VERSION='1.63'. I tried a variety of older Perl versions, both distro-supplied and my compilations, with the same results (or, if old enough, -sections is not supported). Of course I'm happy to supply more information or help debug in any way I can, etc. Thanks for all your work. Karl (karl@freefriends.org)
I think the spec you supplied means something different: "from either NAME or ACTIONS, choose the 'help' head2". You probably want: -sections => [ 'NAME', 'ACTIONS/help' ] Correct? -Marek Am Fr 13. Feb 2015, 19:18:04, karl@freefriends.org schrieb: Show quoted text
> Hi Marek or all - (very glad to hear about the fix for #101581, thanks!) > > Here's another (smaller issue, I hope) problem report with pod2usage. > Running this small self-contained program, including a little pod > at the end: > -------------------------------------------------- > #!/usr/bin/env perl > use Pod::Usage; > pod2usage(-exitstatus => 0, -verbose => 99, > -sections => "NAME|ACTIONS/help", -noperldoc => 1); > 1; > __END__ > =head1 NAME > > trypodi - pod sections usage test > > =head1 ACTIONS > > Para for actions. > > =head2 help > > Help text. > -------------------------------------------------- > > gives me this unexpected output, with the NAME section missing: > > -------------------------------------------------- > help: > Help text. > -------------------------------------------------- > > That is, I'm trying to use -sections to select both the NAME section and > the /help/ subsection of ACTIONS. As far as I can tell from the doc > (http://perldoc.perl.org/Pod/Usage.html), this sort of selection is > intended to work. > > This was on i686-linux with perl 5.20.1, compiled (with gcc 4.9.2) and > installed from the original source; Pod/Usage.pm has $VERSION='1.63'. > I tried a variety of older Perl versions, both distro-supplied and my > compilations, with the same results (or, if old enough, -sections is not > supported). > > Of course I'm happy to supply more information or help debug in any way > I can, etc. Thanks for all your work. > > Karl (karl@freefriends.org)
Subject: Re: [rt.cpan.org #102116] pod2usage() -sections omits section with subsection specified
Date: Sun, 15 Feb 2015 23:08:44 GMT
To: bug-Pod-Usage [...] rt.cpan.org
From: karl [...] freefriends.org (Karl Berry)
Hi Marek, Show quoted text
> -sections => [ 'NAME', 'ACTIONS/help' ]
You're right, the list form works. The doc's use of "Alternatively", and the low precedence of | in regexps, led me to think that the regexp-like "string" form would work too. Maybe some sentence like "With the string form, the /subsection selection applies to all matched sections." (I can't actually see a use for /subsection applying to all sections, but since we have the list form, doesn't seem worth changing the behavior.) Thanks, Karl
Fixed by documentation update: Pod-Usage-1.66