unshift @INC, 'lib';
}
-unshift @INC, ('dist/Cwd', 'dist/Cwd/lib');
-require File::Spec::Functions;
-
my $file = 'lib/buildcustomize.pl';
# To clarify, this isn't the entire suite of modules considered "toolchain"
cpan/File-Path/lib
ext/re
dist/Term-ReadLine/lib
+ dist/Exporter/lib
+ ext/File-Find/lib
+ cpan/Text-Tabs/lib
+ dist/constant/lib
);
# Used only in ExtUtils::Liblist::Kid::_win32_ext()
push @toolchain, 'cpan/Text-ParseWords/lib' if $^O eq 'MSWin32';
+push @toolchain, 'ext/VMS-Filespec/lib' if $^O eq 'VMS';
+
+unshift @INC, @toolchain;
+require File::Spec::Functions;
# lib must be last, as the toolchain modules write themselves into it
# as they build, and it's important that @INC order ensures that the partially
close $fh
or warn "Can't unlink $file after error: $!";
} else {
- close $fh and exit;
- $error = "Can't close $file: $!";
+ if (close $fh) {
+ do $file and exit;
+ $error = "Can't load generated $file: $@";
+ } else {
+ $error = "Can't close $file: $!";
+ }
}
# It's going very wrong, so try to remove the botched file.