forwarded 519785 https://rt.cpan.org/Public/Bug/Display.html?id=41136 tag 519785 patch fixed-upstream thanks
On Sun, Mar 15, 2009 at 03:35:20AM -0400, Dylan Thurston wrote: > On certain pod files, like the one attached, 'pod2usage -verbose 1' > deals incorrectly with formatting codes: the formatted strings come > out at the beginning of the line rather than interpolated. For > instance, the attached file becomes > > ------------------------------------------------------------ > Usage: > psbind [*option*]... [*input-file-name* [*output-file-name*]] > > Options: > "psbind""PSBIND" In addition to specifying the options described below > to on the > command line, you can put them in an environment variable named . > > *Italic* Testing This is [rt.cpan.org #41136] ("Bug 2") and was fixed in Pod-Parser-1.36. Minimal patch attached. With this, the result for your test script is the hopefully expected ------------------------------------------------------------ Usage: psbind [*option*]... [*input-file-name* [*output-file-name*]] Options: In addition to specifying the options described below to "psbind" on the command line, you can put them in an environment variable named "PSBIND". Testing *Italic* ------------------------------------------------------------ I'll see about including the fix before Perl 5.10.1, as it seems to be safe and doesn't break the test suite. -- Niko Tyni nt...@debian.org
>From b6dbb6cea3197150c08003dbd1c8644a5af408db Mon Sep 17 00:00:00 2001 From: Niko Tyni <nt...@debian.org> Date: Sun, 15 Mar 2009 21:42:25 +0200 Subject: [PATCH] Use of -section in Pod::Usage and =over,=back Quoting David Purdie in [rt.cpan.org #41136]: > Bug 2: Use of -section in Pod::Usage and =over,=back > > The use of =over and =back in sections that are not selected with a > -section will cause the display of =items in a selected section to be > incorrectly located. > > When -section is used then the =over operations are processed, but the > =back is ignored. > > The fix also corrects the operation of elements like > =item B<This is in bold> The patch is included in Pod-Parser-1.36. --- lib/Pod/Usage.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/Pod/Usage.pm b/lib/Pod/Usage.pm index cbb55c5..56958c0 100644 --- a/lib/Pod/Usage.pm +++ b/lib/Pod/Usage.pm @@ -631,7 +631,7 @@ sub _handle_element_end { $$self{PENDING}[-1][1] = $_; } } - if ($$self{USAGE_SKIPPING}) { + if ($$self{USAGE_SKIPPING} && $element !~ m/^over-/) { pop @{ $$self{PENDING} }; } else { $self->SUPER::_handle_element_end($element); -- 1.5.6.5