From: Roderick Schertler Date: Wed, 12 Mar 1997 00:09:31 +0000 (-0500) Subject: Re: bug in pod2man (5.00326): section=3 for .pm modules X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2e4a4f557f9874e47c52eb0c8981f7eb28092e68;p=p5sagit%2Fp5-mst-13.2.git Re: bug in pod2man (5.00326): section=3 for .pm modules On Tue, 11 Mar 1997 21:25:10 +0100 (MET), Slaven Rezic said: > > pod2man does not recognize the proper section for .pm modules. You > have to delete the "$section = $opt_section || $DEF_SECTION;" in line > 378 in .../pod/pod2man.PL, since it overrides the proper setting in > line 362. Good catch. Here's that fix plus code to use the man3 extension specified to Configure (I use 3pm myself). p5p-msgid: pzn2sat1hg.fsf@eeyore.ibcinc.com --- diff --git a/pod/pod2man.PL b/pod/pod2man.PL index d1ba228..88ce73f 100644 --- a/pod/pod2man.PL +++ b/pod/pod2man.PL @@ -8,6 +8,7 @@ use File::Basename qw(&basename &dirname); # have to mention them as if they were shell variables, not # %Config entries. Thus you write # $startperl +# $man3ext # to ensure Configure will look for $Config{startperl}. # This forces PL files to create target in same directory as PL file. @@ -27,6 +28,8 @@ print OUT <<"!GROK!THIS!"; $Config{startperl} eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}' if \$running_under_some_shell; + +\$DEF_PM_SECTION = '$Config{man3ext}' || '3'; !GROK!THIS! # In the following, perl variables are not expanded during extraction. @@ -367,7 +370,8 @@ usage("Usage error!") unless $uok; usage() if $opt_help; usage("Need one and only one podpage argument") unless @ARGV == 1; -$section = $opt_section || ($ARGV[0] =~ /\.pm$/ ? 3 : $DEF_SECTION); +$section = $opt_section || ($ARGV[0] =~ /\.pm$/ + ? $DEF_PM_SECTION : $DEF_SECTION); $RP = $opt_release || $DEF_RELEASE; $center = $opt_center || ($opt_official ? $STD_CENTER : $DEF_CENTER); $lax = $opt_lax || $DEF_LAX; @@ -384,7 +388,6 @@ else { die "roff font should be 1 or 2 chars, not `$CFont_embed'"; } -$section = $opt_section || $DEF_SECTION; $date = $opt_date || $DEF_DATE; for (qw{NAME DESCRIPTION}) {