Update of /cvsroot/module-build/Module-Build/lib/Module/Build
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11850/lib/Module/Build
Modified Files:
Base.pm
Log Message:
Since we chdir to the base of the distribution directory containing the Build.PL and Build script, we need only test againt the basename of the script used to invoke the build. Otherwise we are running up_to_date on Build.PL and an invalid path to the Build script.
Index: Base.pm
===================================================================
RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v
retrieving revision 1.537
retrieving revision 1.538
diff -u -d -r1.537 -r1.538
--- Base.pm 4 Dec 2005 07:41:39 -0000 1.537
+++ Base.pm 4 Dec 2005 09:50:13 -0000 1.538
@@ -1178,11 +1178,14 @@
use strict;
use Cwd;
+use File::Basename;
use File::Spec;
+my \$progname;
my \$orig_dir;
BEGIN {
\$^W = 1; # Use warnings
+ \$progname = basename(\$0);
\$orig_dir = Cwd::cwd();
my \$base_dir = '$q{base_dir}';
unless (chdir(\$base_dir)) {
@@ -1200,7 +1203,7 @@
\$^X = Module::Build->find_perl_interpreter
unless File::Spec->file_name_is_absolute(\$^X);
-if (-e 'Build.PL' and not $build_package->up_to_date("Build.PL", \$0)) {
+if (-e 'Build.PL' and not $build_package->up_to_date('Build.PL', \$progname)) {
warn "Warning: Build.PL has been altered. You may need to run 'perl Build.PL' again.\\n";
}
|