From f8184fc985e4a7e419eb980caa7cb3735595ad51 Mon Sep 17 00:00:00 2001 From: Paul Cochrane Date: Sun, 8 Oct 2017 14:46:10 +0200 Subject: [PATCH] Restrict loop variable scope to loop Perlcritic noticed that the loop variable changed here wasn't scoped to the loop it refers to. This change fixes the variable's scope. --- t/dist_version.t | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/t/dist_version.t b/t/dist_version.t index fff7c26..8f50d58 100755 --- a/t/dist_version.t +++ b/t/dist_version.t @@ -102,8 +102,7 @@ subtest 'three part versions' => sub { ['Foo' => '', "...with no suffix"], ); - my $case; - foreach $case (@cases) { + foreach my $case (@cases) { my ($dist_name, $expected_version, $descr) = @$case; my $mock = bless { remote_file => $dist_name }, $class; my $got_version = $mock->dist_version;