Skip to content

Commit

Permalink
Merge pull request #1190 from metacpan/oalders/lexical-vars
Browse files Browse the repository at this point in the history
Use lexical vars in loop
  • Loading branch information
mickeyn authored Apr 27, 2024
2 parents 6bf88ac + 1d3fcc7 commit a5b9347
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 112 deletions.
103 changes: 0 additions & 103 deletions bin/build_test_CPAN_dir.pl

This file was deleted.

12 changes: 3 additions & 9 deletions lib/MetaCPAN/Script/Mapping.pm
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,9 @@ sub delete_all {
|| $runtime_environment eq 'testing' );

if ($is_development) {
my $name = undef;

$self->are_you_sure("ALL Indices will be deleted !!!");

foreach $name ( keys %{ $self->indices_info } ) {
foreach my $name ( keys %{ $self->indices_info } ) {
$self->_delete_index($name);
}
}
Expand Down Expand Up @@ -652,9 +650,7 @@ sub _compare_mapping {
$imatch = 1;

if ( ref $rdeploy eq 'HASH' ) {
my $sfield = undef;

foreach $sfield ( sort keys %$rdeploy ) {
foreach my $sfield ( sort keys %$rdeploy ) {
if ( defined $rdeploy->{$sfield}
&& defined $rmodel->{$sfield} )
{
Expand Down Expand Up @@ -730,9 +726,7 @@ sub _compare_mapping {
}
}
elsif ( ref $rdeploy eq 'ARRAY' ) {
my $iindex = undef;

foreach $iindex (@$rdeploy) {
foreach my $iindex (@$rdeploy) {
if ( defined $rdeploy->[$iindex]
&& defined $rmodel->[$iindex] )
{
Expand Down

0 comments on commit a5b9347

Please sign in to comment.