Re: pod2man update
On Fri, Sep 05, 2008 at 11:57:06PM +0200, Marc 'HE' Brockschmidt wrote:
> Niko Tyni <ntyni@debian.org> writes:
> > I have now cleaned out the functional part of those changes, attached
> > as pod2man-functional.patch and amounting to
> >
> > lib/Pod/Man.pm | 108 ++++++++++++++++++++++++++++++---------------------------
> > pod/pod2man.PL | 27 +++++++++++---
> > 2 files changed, 80 insertions(+), 55 deletions(-)
>
> Please go ahead and upload this.
Thanks. This means we can remove podlators-perl from lenny.
Here's one more proposed change; please ack/nack.
I'll try to shut up and upload after this :)
* Make /usr/bin/perldoc invoke pod2man with the "--utf8" option if it
detects a new enough Pod::Man version. (Closes: #492037)
[rt.cpan.org #39000], no comment from upstream yet.
diff --git a/lib/Pod/Perldoc/ToMan.pm b/lib/Pod/Perldoc/ToMan.pm
index 4319122..f697e5c 100644
--- a/lib/Pod/Perldoc/ToMan.pm
+++ b/lib/Pod/Perldoc/ToMan.pm
@@ -60,6 +60,10 @@ sub parse_from_file {
unless -e $pod2man;
}
+ eval { require Pod::Man };
+ $switches .= " --utf8"
+ if (!$@ && $Pod::Man::VERSION >= 2.18);
+
my $command = "$pod2man $switches --lax $file | $render -man";
# no temp file, just a pipe!
The Pod::Man version check is redundant as both Pod::Man and Pod::Perldoc
are in perl-modules, but it doesn't hurt much and makes this survive an
installation that has a locally installed older Pod::Man somewhere.
Although we can't make pod2man default to --utf8 (because it's conceivable
that the output generated on Debian will be used on non-Debian platforms
whose *roff can't handle it), I think there's no problem in doing that
for perldoc where the output is only intended for local consumption.
--
Niko Tyni ntyni@debian.org
Reply to: