mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-22 22:17:54 +00:00
parallel: Fixed Perl::Critic: Loop iterator is not lexical.
This commit is contained in:
parent
a50adb5080
commit
c60cc12b24
10
src/parallel
10
src/parallel
|
@ -1089,7 +1089,7 @@ sub shell_unquote {
|
||||||
# string with shell quoting removed
|
# string with shell quoting removed
|
||||||
my @strings = (@_);
|
my @strings = (@_);
|
||||||
my $arg;
|
my $arg;
|
||||||
for $arg (@strings) {
|
for my $arg (@strings) {
|
||||||
if(not defined $arg) {
|
if(not defined $arg) {
|
||||||
$arg = "";
|
$arg = "";
|
||||||
}
|
}
|
||||||
|
@ -5189,11 +5189,11 @@ sub trim_of {
|
||||||
if($Global::trim eq "n") {
|
if($Global::trim eq "n") {
|
||||||
# skip
|
# skip
|
||||||
} elsif($Global::trim eq "l") {
|
} elsif($Global::trim eq "l") {
|
||||||
for $arg (@strings) { $arg =~ s/^\s+//; }
|
for my $arg (@strings) { $arg =~ s/^\s+//; }
|
||||||
} elsif($Global::trim eq "r") {
|
} elsif($Global::trim eq "r") {
|
||||||
for $arg (@strings) { $arg =~ s/\s+$//; }
|
for my $arg (@strings) { $arg =~ s/\s+$//; }
|
||||||
} elsif($Global::trim eq "rl" or $Global::trim eq "lr") {
|
} elsif($Global::trim eq "rl" or $Global::trim eq "lr") {
|
||||||
for $arg (@strings) { $arg =~ s/^\s+//; $arg =~ s/\s+$//; }
|
for my $arg (@strings) { $arg =~ s/^\s+//; $arg =~ s/\s+$//; }
|
||||||
} else {
|
} else {
|
||||||
::error("--trim must be one of: r l rl lr.\n");
|
::error("--trim must be one of: r l rl lr.\n");
|
||||||
::wait_and_exit(255);
|
::wait_and_exit(255);
|
||||||
|
@ -5301,7 +5301,7 @@ sub acquire {
|
||||||
$self->atomic_link_if_count_less_than() and last;
|
$self->atomic_link_if_count_less_than() and last;
|
||||||
::debug("Remove dead locks");
|
::debug("Remove dead locks");
|
||||||
my $lockdir = $self->{'lockdir'};
|
my $lockdir = $self->{'lockdir'};
|
||||||
for my $d (<$lockdir/*>) {
|
for my $d (glob "$lockdir/*") {
|
||||||
::debug("Lock $d $lockdir\n");
|
::debug("Lock $d $lockdir\n");
|
||||||
$d =~ m:$lockdir/([0-9]+)\@([-\._a-z0-9]+)$:o or next;
|
$d =~ m:$lockdir/([0-9]+)\@([-\._a-z0-9]+)$:o or next;
|
||||||
my ($pid, $host) = ($1, $2);
|
my ($pid, $host) = ($1, $2);
|
||||||
|
|
Loading…
Reference in a new issue