| line |
true |
false |
branch |
|
38
|
0 |
0 |
unless ref $self |
|
46
|
0 |
0 |
if ($INT or $TERM) |
|
47
|
0 |
0 |
$TERM ? : |
|
54
|
0 |
0 |
if @{$self->{'pending'};} == 0 and $self->{'running'}->count == 0 |
|
59
|
0 |
0 |
unless ($self->{'quiet'}) |
|
63
|
0 |
0 |
@fail ? : |
|
99
|
0 |
0 |
unless $parser->getoptionsfromarray(\@argv, "c|concurrency=i", \($self->{'concurrency'} = 5), "h|help", sub {
$self->show_help;
exit 1;
}
, "s|script=s", \$self->{'script'}, "v|version", sub {
printf "%s %s\n", "App::RemoteCommand", "App::RemoteCommand"->VERSION;
exit;
}
, "a|ask-sudo-password", \my $ask_sudo_password, "H|host-file=s", \my $host_file, "sudo-password=s", \$self->{'sudo_password'}, "append-hostname!", \(my $append_hostname = 1), "append-time!", \my $append_time, "sudo=s", \$self->{'sudo_user'}, "q|quiet", \$self->{'quiet'}, "F=s", \$self->{'configfile'}) |
|
102
|
0 |
0 |
$host_file ? : |
|
103
|
0 |
0 |
if ($self->{'script'}) { } |
|
109
|
0 |
0 |
unless $self->{'command'} |
|
|
0 |
0 |
unless (@{[] unless $self->{'command'};} or $self->{'script'}) |
|
113
|
0 |
0 |
if ($self->{'script'}) |
|
115
|
0 |
0 |
unless File::Copy::copy($self->{'script'}, $tempfh) |
|
127
|
0 |
0 |
if ($ask_sudo_password) |
|
131
|
0 |
0 |
$host_file ? : |
|
155
|
0 |
0 |
if ($self->{'select'}->count == 0) { } |
|
166
|
0 |
0 |
if ($pid > 0 and my $remove = $self->{'select'}->remove("pid", $pid)) |
|
171
|
0 |
0 |
$pid > 0 ? : |
|
173
|
0 |
0 |
unless ($is_running) |
|
189
|
0 |
0 |
if ($len) { } |
|
|
0 |
0 |
elsif (not defined $len) { } |
|
190
|
0 |
0 |
if (my(@line) = $buffer->add($buf)->get) |
|
192
|
0 |
0 |
if ($ready->{'sudo'} and @line == 1 and $line[0] eq $SUDO_FAIL) |
|
199
|
0 |
0 |
if ($buffer->raw eq $SUDO_PROMPT) |
|
203
|
0 |
0 |
if (my $sudo_password = $self->{'sudo_password'}) { } |
|
213
|
0 |
0 |
if ($errno != 5) |
|
227
|
0 |
0 |
if ($fh) |
|
234
|
0 |
0 |
if (defined $len and $len > 0) { } |
|
250
|
0 |
0 |
if $self->{'sudo_user'} |
|
254
|
0 |
0 |
if (my $script = $self->{'script'}) { } |
|
272
|
0 |
0 |
@{$self->{'command'};} == 1 && $self->{'command'}[0] =~ /$escape/u ? : |
|
285
|
0 |
0 |
if $ssh_at_exit |
|
292
|
0 |
0 |
if ($opt{'append_time'} and $opt{'append_hostname'}) { } |
|
|
0 |
0 |
elsif ($opt{'append_time'}) { } |
|
|
0 |
0 |
elsif ($opt{'append_hostname'}) { } |
|
310
|
0 |
0 |
unless open my $fh, "<", $host_file |
|
314
|
0 |
0 |
if $line =~ /^[^#\s]/u |