develooper Front page | perl.perl5.porters | Postings from March 2000

[PATCH 5.6RC2] Pod::Man bug fix

From:
Russ Allbery
Date:
March 18, 2000 23:31
Subject:
[PATCH 5.6RC2] Pod::Man bug fix
Message ID:
ylsnxn5sbc.fsf@windlord.stanford.edu
This one needs to be in 5.6 if at all possible.  Don't know why I didn't
catch this one sooner.  Thanks to Johan Vromans for the bug report.

2000-03-18  Russ Allbery  <rra@stanford.edu>

	* lib/Pod/Man.pm (begin_pod): Strip a leading lib/ from a file
	name for module man pages, needed for ExtUtils::MakeMaker.

--- Man.pm	2000/03/16 22:00:36	1.1
+++ Man.pm	2000/03/19 07:30:13	1.2
@@ -1,5 +1,5 @@
 # Pod::Man -- Convert POD data to formatted *roff input.
-# $Id: Man.pm,v 1.1 2000/03/16 22:00:36 eagle Exp $
+# $Id: Man.pm,v 1.2 2000/03/19 07:30:13 eagle Exp $
 #
 # Copyright 1999, 2000 by Russ Allbery <rra@stanford.edu>
 #
@@ -38,7 +38,7 @@
 # Perl core and too many things could munge CVS magic revision strings.
 # This number should ideally be the same as the CVS revision in podlators,
 # however.
-$VERSION = 1.01;
+$VERSION = 1.02;
 
 
 ############################################################################
@@ -396,7 +396,8 @@
             #     */lib/*perl*      standard or site_perl module
             #     */*perl*/lib      from -D prefix=/opt/perl
             #     */*perl*/         random module hierarchy
-            # which works.  Should be fixed to use File::Spec.
+            # which works.  Should be fixed to use File::Spec.  Also handle
+            # a leading lib/ since that's what ExtUtils::MakeMaker creates.
             for ($name) {
                 s%//+%/%g;
                 if (     s%^.*?/lib/[^/]*perl[^/]*/%%si
@@ -405,6 +406,7 @@
                     s%^(.*-$^O|$^O-.*)/%%so;  # arch
                     s%^\d+\.\d+%%s;           # version
                 }
+                s%^lib/%%;
                 s%/%::%g;
             }
         }

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>



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