----- Original Message ----- 
From: "Jan Dubois"
.
.
>
> It is my understanding that this line is never needed and has therefore
> been removed from Module::Install 0.61.

Ok ... thanks - that should make it fairly simple for Steffen to fix.

>
> So the simple fix is to just remove that line from the PAR version of
> Module::Install. Of course it would still be interesting to figure out
> why 0.61 doesn't work for PAR anymore. That sounds like a regression in
> Module::Install that should to be investigated and probably fixed.
>

Well .... if you take the find_extensions() subroutine from PAR's version
(0.54) of Install.pm and stick that in the 0.61 version of Install.pm, then
PAR builds fine with that amended 0.61. Here's a 'diff -u' on the files. The
'-' lines are lines that are in the original 0.61 Install.pm, the '+' lines
are from the amended 0.61 Install.pm (that works with PAR):

--- E:\perl817\site\lib\Module\Install.pm       2006-03-16
00:08:16.000000000 +1
100
+++ E:\comp_817\par-0.92\inc\Module\Install.pm  2006-04-03
18:29:44.000000000 +1
000
@@ -219,32 +219,10 @@
     File::Find::find( sub {
         my $file = $File::Find::name;
         return unless $file =~ m!^\Q$path\E/(.+)\.pm\Z!is;
-        my $subpath = $1;
-        return if lc($subpath) eq lc($self->{dispatch});
-
-        $file = "$self->{path}/$subpath.pm";
-        my $pkg = "$self->{name}::$subpath";
-        $pkg =~ s!/!::!g;
-
-        # If we have a mixed-case package name, assume case has been
preserved
-        # correctly.  Otherwise, root through the file to locate the
case-preserved
-        # version of the package name.
-        if ( $subpath eq lc($subpath) || $subpath eq uc($subpath) ) {
-            open PKGFILE, "<$subpath.pm" or die "find_extensions: Can't
open $subpath.pm: $!";
-            my $in_pod = 0;
-            while ( <PKGFILE> ) {
-                $in_pod = 1 if /^=\w/;
-                $in_pod = 0 if /^=cut/;
-                next if ($in_pod || /^=cut/);  # skip pod text
-                next if /^\s*#/;               # and comments
-                if ( m/^\s*package\s+($pkg)\s*;/i ) {
-                    $pkg = $1;
-                    last;
-                }
-            }
-            close PKGFILE;
-        }
+        return if $1 eq $self->{dispatch};

+        $file = "$self->{path}/$1.pm";
+        my $pkg = "$self->{name}::$1"; $pkg =~ s!/!::!g;
         push @found, [ $file, $pkg ];
     }, $path ) if -d $path;


No doubt find_extensions() was altered for a reason - it seems that the
amendment somehow causes PRIVATE/PAR.pm to become unlocatable - and simply
relocating the PRIVATE folder was not the fix. Perhaps someone intelligent
can spot that reason from the above diff. (Good .... that takes the onus
away from me :-)

One thing I did find interesting wrt using the original (unsisyphised) 0.61
version was that simply relocating the PRIVATE folder up one level was not
enough to make PRIVATE/PAR.pm locatable. I also had to remove the PRIVATE
folder from its original location. (ie I had to do a cut'n'paste -
copy'n'paste was not sufficient.) If I didn't do that I still got the same
error that PRIVATE/PAR.pm was unlocatable.

Cheers,
Rob

Reply via email to