Skip to content

Commit a5b9347

Browse files
authored
Merge pull request #1190 from metacpan/oalders/lexical-vars
Use lexical vars in loop
2 parents 6bf88ac + 1d3fcc7 commit a5b9347

File tree

2 files changed

+3
-112
lines changed

2 files changed

+3
-112
lines changed

bin/build_test_CPAN_dir.pl

Lines changed: 0 additions & 103 deletions
This file was deleted.

lib/MetaCPAN/Script/Mapping.pm

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -255,11 +255,9 @@ sub delete_all {
255255
|| $runtime_environment eq 'testing' );
256256

257257
if ($is_development) {
258-
my $name = undef;
259-
260258
$self->are_you_sure("ALL Indices will be deleted !!!");
261259

262-
foreach $name ( keys %{ $self->indices_info } ) {
260+
foreach my $name ( keys %{ $self->indices_info } ) {
263261
$self->_delete_index($name);
264262
}
265263
}
@@ -652,9 +650,7 @@ sub _compare_mapping {
652650
$imatch = 1;
653651

654652
if ( ref $rdeploy eq 'HASH' ) {
655-
my $sfield = undef;
656-
657-
foreach $sfield ( sort keys %$rdeploy ) {
653+
foreach my $sfield ( sort keys %$rdeploy ) {
658654
if ( defined $rdeploy->{$sfield}
659655
&& defined $rmodel->{$sfield} )
660656
{
@@ -730,9 +726,7 @@ sub _compare_mapping {
730726
}
731727
}
732728
elsif ( ref $rdeploy eq 'ARRAY' ) {
733-
my $iindex = undef;
734-
735-
foreach $iindex (@$rdeploy) {
729+
foreach my $iindex (@$rdeploy) {
736730
if ( defined $rdeploy->[$iindex]
737731
&& defined $rmodel->[$iindex] )
738732
{

0 commit comments

Comments
 (0)