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

Reply via email to