Footprintless/CommandRunner/IPCRun3.pm

filter: Statementstmt 100% 29 / 29 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod n/a totaltotal 100% 37 / 37 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Footprintless/MixableBase.pm ↑ Summary Footprintless/Resource.pm »
1 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package Footprintless::CommandRunner::IPCRun3;
5 1 $Footprintless::CommandRunner::IPCRun3::VERSION = '1.29';
6 # ABSTRACT: An implementation of Footprintless::CommandRunner using IPC::Run3
7 # PODNAME: Footprintless::CommandRunner::IPCRun3
8  
9 1 ▶use parent qw(Footprintless::CommandRunner);
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 1 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 1 ▶use IPC::Run3;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 1 ▶use Log::Any;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 1 my $logger = Log::Any->get_logger();
16  
17 3 ▶sub _run3_options {
Subroutine _run3_options: called CC=1 SCAR=0.0
18 3 my ( $self, $runner_options ) = @_;
19  
20 3 my $in = \undef;
21 3 my $out = \$self->{last_call}{stdout};
22 3 my $err = \$self->{last_call}{stderr};
23  
24 3 return ( $in, $out, $err );
25 }
26  
27 3 ▶sub _run {
Subroutine _run: called CC=1 SCAR=0.0
28 3 my ( $self, $command, $runner_options ) = @_;
29 3 run3( $command, $self->_run3_options($runner_options) );
30 3 return $? >> 8;
31 }
32  
33 1 1;
34  
35 __END__
« Footprintless/MixableBase.pm ↑ Summary Footprintless/Resource.pm »