]> git.vpit.fr Git - perl/modules/Lexical-Types.git/commitdiff
Fix test failures with Strawberry Perl 5.12
authorVincent Pit <vince@profvince.com>
Mon, 3 Jan 2011 11:40:59 +0000 (12:40 +0100)
committerVincent Pit <vince@profvince.com>
Mon, 3 Jan 2011 11:40:59 +0000 (12:40 +0100)
perl crashes because the SystemRoot environment variable is missing.

t/31-threads-teardown.t

index 632293b6373a5057c3e609da3e8e51a720686a62..2354e608f2c0bd834e3b80f34d644615ec339e5f 100644 (file)
@@ -30,7 +30,10 @@ BEGIN {
 sub run_perl {
  my $code = shift;
 
 sub run_perl {
  my $code = shift;
 
+ my $SystemRoot   = $ENV{SystemRoot};
  local %ENV;
  local %ENV;
+ $ENV{SystemRoot} = $SystemRoot if $^O eq 'MSWin32' and defined $SystemRoot;
+
  system { $^X } $^X, '-T', map("-I$_", @INC), '-e', $code;
 }
 
  system { $^X } $^X, '-T', map("-I$_", @INC), '-e', $code;
 }