From e812e1e8e98e6f2cf4362feff753023052129851 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Tue, 29 Jun 2010 18:25:29 +0100 Subject: [PATCH] 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 --- cpan/Module-Build/t/lib/MBTest.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 { -- 2.7.4