Skip to content

Commit

Permalink
avoid zero-arg ref in ternary; ambiguous on older perls
Browse files Browse the repository at this point in the history
  • Loading branch information
rjbs committed Apr 22, 2016
1 parent f61192b commit ac45d85
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions Changes
@@ -1,6 +1,7 @@
Revision history for {{$dist->name}}

{{$NEXT}}
- avoid using syntax that is called ambiguous on older perls

5.045 2016-04-22 11:37:13+01:00 Europe/London
- add 'relationship' option to AutoPrereqs plugin (Karen Etheridge)
Expand Down
2 changes: 1 addition & 1 deletion lib/Dist/Zilla/App/Tester.pm
Expand Up @@ -25,7 +25,7 @@ sub test_dzil {
my ($self, $source, $argv, $arg) = @_;
$arg ||= {};

local @INC = map {; ref ? $_ : File::Spec->rel2abs($_) } @INC;
local @INC = map {; ref($_) ? $_ : File::Spec->rel2abs($_) } @INC;

my $tmpdir = $arg->{tempdir} || File::Temp::tempdir(CLEANUP => 1);
my $root = dir($tmpdir)->subdir('source');
Expand Down
4 changes: 2 additions & 2 deletions lib/Dist/Zilla/Tester.pm
Expand Up @@ -172,7 +172,7 @@ sub minter { 'Dist::Zilla::Tester::_Minter' }

$Log_Events = $arg->{chrome}->logger->events;

local @INC = map {; ref ? $_ : File::Spec->rel2abs($_) } @INC;
local @INC = map {; ref($_) ? $_ : File::Spec->rel2abs($_) } @INC;

local $ENV{DZIL_GLOBAL_CONFIG_ROOT};
$ENV{DZIL_GLOBAL_CONFIG_ROOT} = $tester_arg->{global_config_root}
Expand Down Expand Up @@ -292,7 +292,7 @@ sub minter { 'Dist::Zilla::Tester::_Minter' }
local $arg->{chrome} = Dist::Zilla::Chrome::Test->new;
$Log_Events = $arg->{chrome}->logger->events;

local @INC = map {; ref ? $_ : File::Spec->rel2abs($_) } @INC;
local @INC = map {; ref($_) ? $_ : File::Spec->rel2abs($_) } @INC;

my $global_config_root = Path::Class::dir($tester_arg->{global_config_root})->absolute;

Expand Down

0 comments on commit ac45d85

Please sign in to comment.