Hi,

Just pushed Inline-0.49_01 to CPAN.
Most significant change is the attached alteration to Inline.pm's sub create_config_file().

The renaming of 'my @INC' to 'my @_inc' is just to remove any thoughts that this might be altering perl's @INC. If someone sees a problem with that, please let me know - it's *not* part of the fix (that's mentioned next), so can be reverted if there's a need.

The rest of this patch should render Inline::CPP once more buildable by the smokers that the cpan-testers use - and should see the end of the FAIL reports such as:
http://www.cpantesters.org/cpan/report/3b90f976-4d0c-11e1-9d6f-f6dbfa7543f5

It should also mean that anyone else who happens to have Inline and Parse::RecDescent in different PERL5LIB locations will also be able to build Inline::CPP - which is something they currently can't do, afaict. (At least, I got the same errors as the smokers when I created such a set up.)

Should this fix be implemented differently ?
Another solution is to remove the code (in the same sub) that local()ises $ENV{PERL5LIB} - but I didn't want to take that path for fear of breaking something. I'm assuming that local()isation does something crucial ... does anyone know ?

If 0.49_01 tests ok, and no-one has any problems with it, it will shortly become 0.50 (stable) - so that the Inline::CPP can (hopefully) get back to getting useful results from the cpan-testers.

For the other changes that have been made since 0.49, see the top-level Changes file, and the C/Changes file.

Cheers,
Rob
--- Inline-0.49/Inline.pm       2012-02-01 13:09:51 +1100
+++ Inline/Inline.pm    2012-02-02 19:04:02 +1100
@@ -2,7 +2,7 @@

use strict;
require 5.006;
-$Inline::VERSION = '0.49';
+$Inline::VERSION = '0.49_01';

use AutoLoader 'AUTOLOAD';
use Inline::denter;
@@ -804,15 +804,15 @@
        my($v,$d,$f) = File::Spec->splitpath($inline);
        $f = "" if $f eq 'Inline.pm';
        $inline = File::Spec->catpath($v,$d,$f);
-        #my $INC = "-I$inline -I" .
-        #          join(" -I", grep {(-d File::Spec->catdir($_,"Inline") or
-        #                             -d File::Spec->catdir($_,"auto","Inline")
-         #                         )} @INC);
-       #system "$perl $INC -MInline=_CONFIG_ -e1 $dir"
-        my @INC = map { "-I$_" }
+
+        # P::RD may be in a different PERL5LIB dir to Inline (as happens with 
cpan smokers).
+        # Therefore we need to grep for it - otherwise, if P::RD *is* in a 
different PERL5LIB
+        # directory the ensuing rebuilt @INC will not include that directory 
and attempts to use
+        # Inline::CPP (and perhaps other Inline modules) will fail because 
P::RD isn't found.
+        my @_inc = map { "-I$_" }
       ($inline,
-        grep {(-d File::Spec->catdir($_,"Inline") or -d 
File::Spec->catdir($_,"auto","Inline"))} @INC);
-       system $perl, @INC, "-MInline=_CONFIG_", "-e1", "$dir"
+        grep {(-d File::Spec->catdir($_,"Inline") or -d 
File::Spec->catdir($_,"auto","Inline") or -e File::Spec->catdir($_,"Parse/RecDescent.pm"))} 
@INC);
+       system $perl, @_inc, "-MInline=_CONFIG_", "-e1", "$dir"
          and croak M20_config_creation_failed($dir);
        return;
    }

Reply via email to