Author: kwilliams
Date: Mon Jan 28 20:08:52 2008
New Revision: 10665
Modified:
Module-Build/trunk/lib/Module/Build/Compat.pm
Log:
'use lib' arg must be in Unix format
Modified: Module-Build/trunk/lib/Module/Build/Compat.pm
==============================================================================
--- Module-Build/trunk/lib/Module/Build/Compat.pm (original)
+++ Module-Build/trunk/lib/Module/Build/Compat.pm Mon Jan 28 20:08:52 2008
@@ -50,7 +50,7 @@
}
# If a *bundled* custom subclass is being used, make sure we add its
- # directory to @INC.
+ # directory to @INC. Also, lib.pm always needs paths in Unix format.
my $subclass_load = '';
if (ref($build) ne "Module::Build") {
my $subclass_dir = $package->subclass_dir($build);
@@ -60,10 +60,13 @@
if ($build->dir_contains($base_dir, $subclass_dir)) {
$subclass_dir = File::Spec->abs2rel($subclass_dir, $base_dir);
+ $subclass_dir = $package->unixify_dir($subclass_dir);
$subclass_load = "use lib '$subclass_dir';";
}
+ # Otherwise, leave it the empty string
} else {
+ $subclass_dir = $package->unixify_dir($subclass_dir);
$subclass_load = "use lib '$subclass_dir';";
}
}
@@ -161,6 +164,11 @@
|| File::Spec->catdir($build->config_dir, 'lib'));
}
+sub unixify_dir {
+ my ($self, $path) = @_;
+ return join '/', File::Spec->splitdir($path);
+}
+
sub makefile_to_build_args {
shift;
my @out;