From 2fe62cdf29abfb021a3a8c0d6bebbd45c5a8e17f Mon Sep 17 00:00:00 2001 From: Graham Ollis Date: Thu, 11 Jun 2015 10:11:46 -0400 Subject: [PATCH] Fix warning on Perl 5.8.8 that causes test failure in file.t Weird but true: on Perl 5.8.8, this gives a warning: perl -e 'use warnings; local $ENV{FOO} = undef' ; Use of uninitialized value in scalar assignment at -e line 1. That is not generated on 5.8.9 or 5.10.0. Because t/file.t is using Test::FailWarnings this causes it to fail. --- lib/Dist/Zilla/Tester.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Dist/Zilla/Tester.pm b/lib/Dist/Zilla/Tester.pm index 9a25573b2..4115cfa78 100644 --- a/lib/Dist/Zilla/Tester.pm +++ b/lib/Dist/Zilla/Tester.pm @@ -160,7 +160,9 @@ sub minter { 'Dist::Zilla::Tester::_Minter' } local @INC = map {; ref($_) ? $_ : File::Spec->rel2abs($_) } @INC; - local $ENV{DZIL_GLOBAL_CONFIG_ROOT} = $tester_arg->{global_config_root}; + local $ENV{DZIL_GLOBAL_CONFIG_ROOT}; + $ENV{DZIL_GLOBAL_CONFIG_ROOT} = $tester_arg->{global_config_root} + if defined $ENV{DZIL_GLOBAL_CONFIG_ROOT}; my $zilla = $self->$orig($arg);