I found I needed to make this change to t/lib/MBTest.pm to get it to work in
the perl core on machines using ccache.
Without it, $ENV{HOME} is set to a relative path, because at the time that the
BEGIN block runs to sets it, $cwd is not yet initialised, hence original_cwd()
returns a relative path, and then ccache gets upset and exits without
compiling, because it can't create $ENV{HOME}/.ccache
Nicholas Clark
----- Forwarded message from Nicholas Clark <[email protected]> -----
Envelope-to: [email protected]
Delivery-date: Tue, 29 Jun 2010 18:40:37 +0100
Mailing-List: contact [email protected]; run by ezmlm
Mail-Followup-To: [email protected]
Delivered-To: mailing list [email protected]
Delivered-To: [email protected]
From: "Nicholas Clark" <[email protected]>
To: [email protected]
Subject: [perl.git] branch blead, updated. v5.13.2-103-ge812e1e
Reply-To: "Perl5 Porters" <[email protected]>
Date: Tue, 29 Jun 2010 19:40:23 +0200
In perl.git, the branch blead has been updated
<http://perl5.git.perl.org/perl.git/commitdiff/e812e1e8e98e6f2cf4362feff753023052129851?hp=686c4ca09cf9d6ae455bf0a013551e92f00e34fe>
- Log -----------------------------------------------------------------
commit e812e1e8e98e6f2cf4362feff753023052129851
Author: Nicholas Clark <[email protected]>
Date: Tue Jun 29 18:25:29 2010 +0100
When testing in core, ensure that the local $ENV{HOME} is absolute.
Without this ppm.t and xs.t fail with ccache, because it can't create
$ENV{HOME}/.ccache
-----------------------------------------------------------------------
Summary of changes:
cpan/Module-Build/t/lib/MBTest.pm | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/cpan/Module-Build/t/lib/MBTest.pm
b/cpan/Module-Build/t/lib/MBTest.pm
index 005920f..bf3cebd 100644
--- a/cpan/Module-Build/t/lib/MBTest.pm
+++ b/cpan/Module-Build/t/lib/MBTest.pm
@@ -97,8 +97,12 @@ __PACKAGE__->export(scalar caller, @extra_exports);
# always return to the current directory
{
- my $cwd = File::Spec->rel2abs(Cwd::cwd);
+ my $cwd;
+ BEGIN {
+ $cwd = File::Spec->rel2abs(Cwd::cwd);
+ }
+ # This is called at BEGIN time below, so anything it uses must be initialised
sub original_cwd { return $cwd }
END {
--
Perl5 Master Repository
----- End forwarded message -----