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