line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
598
|
use strict; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
36
|
|
2
|
1
|
|
|
1
|
|
9
|
use warnings; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
69
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Footprintless::CommandRunner::IPCRun3; |
5
|
|
|
|
|
|
|
$Footprintless::CommandRunner::IPCRun3::VERSION = '1.26'; |
6
|
|
|
|
|
|
|
# ABSTRACT: An implementation of Footprintless::CommandRunner using IPC::Run3 |
7
|
|
|
|
|
|
|
# PODNAME: Footprintless::CommandRunner::IPCRun3 |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
222
|
use parent qw(Footprintless::CommandRunner); |
|
1
|
|
|
|
|
228
|
|
|
1
|
|
|
|
|
4
|
|
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
48
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
56
|
|
12
|
1
|
|
|
1
|
|
464
|
use IPC::Run3; |
|
1
|
|
|
|
|
22486
|
|
|
1
|
|
|
|
|
55
|
|
13
|
1
|
|
|
1
|
|
9
|
use Log::Any; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
my $logger = Log::Any->get_logger(); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub _run3_options { |
18
|
3
|
|
|
3
|
|
8
|
my ( $self, $runner_options ) = @_; |
19
|
|
|
|
|
|
|
|
20
|
3
|
|
|
|
|
8
|
my $in = \undef; |
21
|
3
|
|
|
|
|
11
|
my $out = \$self->{last_call}{stdout}; |
22
|
3
|
|
|
|
|
7
|
my $err = \$self->{last_call}{stderr}; |
23
|
|
|
|
|
|
|
|
24
|
3
|
|
|
|
|
21
|
return ( $in, $out, $err ); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub _run { |
28
|
3
|
|
|
3
|
|
11
|
my ( $self, $command, $runner_options ) = @_; |
29
|
3
|
|
|
|
|
13
|
run3( $command, $self->_run3_options($runner_options) ); |
30
|
3
|
|
|
|
|
14768
|
return $? >> 8; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__END__ |