develooper Front page | perl.perl5.porters | Postings from November 2008

[perl #34500] Pod::Man vs vendor_perl (wrong manpage titles)

From:
Steve Peters via RT
Date:
November 25, 2008 02:27
Subject:
[perl #34500] Pod::Man vs vendor_perl (wrong manpage titles)
Message ID:
rt-3.6.HEAD-15187-1227587593-1765.34500-15-0@perl.org
On Sat Mar 19 11:27:54 2005, at@altlinux.ru wrote:
> This is a bug report for perl from at@altlinux.ru,
> generated with the help of perlbug 1.35 running under perl v5.8.6.
> 
> 
> -----------------------------------------------------------------
> [Please enter your report here]
> 
> Hello,
> 
> When I run "perldoc LWP", I get wrong manpage title:
> "vendor_perl::LWP".
> (The same way I get "vendor_perl::XML::Parser" for XML::Parser etc.)
> This is because these modules are installed in vendor directories
> (widely
> used in modern Linux distributions for vendor-supplied perl packages).
> Vendor directories were introduced with perl-5.8.0, and some pieces
> of software are not ready for this change.
> 
> Here is a patch for Pod/Man.pm that fixes the problem for me:
> 
> --- perl-5.8.6/lib/Pod/Man.pm-	2003-03-31 11:16:36 +0000
> +++ perl-5.8.6/lib/Pod/Man.pm	2005-03-19 18:58:12 +0000
> @@ -411,7 +411,7 @@ sub begin_pod {
>              }
>              if ($cut > 0) {
>                  splice (@dirs, 0, $cut);
> -                shift @dirs if ($dirs[0] =~ /^site(_perl)?$/);
> +                shift @dirs if ($dirs[0] =~
> /^(site|vendor)(_perl)?$/);
>                  shift @dirs if ($dirs[0] =~ /^[\d.]+$/);
>                  shift @dirs if ($dirs[0] =~ /^(.*-$^O|$^O-.*|$^O)$/);
>              }
> End of patch
> 
> Now I get correct manpage titles.
> I also noticed similar issue in Pod/Find.pm:
> 
> --- perl-5.8.6/lib/Pod/Find.pm-	2004-06-01 12:41:24 +0000
> +++ perl-5.8.6/lib/Pod/Find.pm	2005-03-19 19:10:56 +0000
> @@ -168,10 +168,10 @@ sub pod_find
> 
>          if ($^O eq 'MacOS') {
>              $SIMPLIFY_RX =
> -              qq!^(?i:\:?site_perl\:|\:?pod\:(?=.*?\\.pod\\z))*!;
> +
> qq!^(?i:\:?(?:site|vendor)_perl\:|\:?pod\:(?=.*?\\.pod\\z))*!;
>          } else {
>              $SIMPLIFY_RX =
> -
> qq!^(?i:site(_perl)?/|\Q$Config::Config{archname}\E/|\\d+\\.\\d+([_.]?\\d+)?/|pod/(?=.*?
\\.pod\\z))*!;
> +
> qq!^(?i:(?:site|vendor)(_perl)?/|\Q$Config::Config{archname}\E/|\\d+\\.\\d+([_.]?\\d+)?
/|pod/(?=.*?\\.pod\\z))*!;
>          }
>      }
> End of patch
> 
> This two files are known to be part of "podlators" and "PodParser"
> CPAN
> distributions.  Should I file bugs at rt.cpan.org too?
> 
> 


This fix was included with podlators-2.00.  Thanks!

Steve Peters



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About