Subject: | Inline.pm fails (tests) when the build directory contains spaces |
The tests fail due to manual building of a string to pass to the shell, for example when the .cpan directory is located in
C:\Dokumente und Einstellungen\Max\.cpan
(as is the default under Windows 2000).
Here's the patch to fix my problems with Inline. The problems extend to Inline/C.pm, with which I'm still struggling, and also into ExtUtils::MakeMaker, which I'll also submit patches for.
If I move the build directory to a directory without a space in it, everything works fine.
--- Inline.pm.old 2002-10-28 08:25:19.000000000 +0100
+++ Inline.pm 2003-10-17 22:35:00.000000000 +0200
@@ -740,11 +740,15 @@ sub create_config_file {
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 = "-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$_" }
+ ($inline,
+ grep {(-d File::Spec->catdir($_,"Inline") or -d File::Spec->
catdir($_,"auto","Inline"))} @INC);
+ system $perl, @INC, "-MInline=_CONFIG_", "-e1", "$dir"
and croak M20_config_creation_failed($dir);
return;
}
@@ -929,7 +933,7 @@ sub write_inl_file {
File::Spec->catfile($o->{API}{install_lib},"auto",$o->{API}{modpname},
"$o->{API}{modfname}.inl");
open INL, "> $inl"
- or croak "Can't create Inline validation file $inl";
+ or croak "Can't create Inline validation file $inl: $!";
my $apiversion = $Config{apiversion} || $Config{xs_apiversion};
print INL Inline::denter->new()
->indent(*md5, $o->{INLINE}{md5},