Infrastructure/Config/Facter.pm

filter: Statementstmt 70.0% 14 / 20 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 3 / 5 Podpod n/a totaltotal 62.9% 17 / 27 CC 2 SCAR 10.4
CC
2
Cov
64%
__ANON__
6.0
__ANON__
2.0
BEGIN
1.0
CRAP 2.8
« Infrastructure/Socket.pm ↑ Summary Infrastructure/SystemUser.pm »
1 package Test::BDD::Infrastructure::Config::Facter;
2  
3 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 # ABSTRACT: configuration class for Test::BDD::Infrastructure
6 1 our $VERSION = '1.005'; # VERSION
7  
8 1 extends 'Test::BDD::Infrastructure::Config::Hash';
9  
10 1 ▶use IPC::Run;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use JSON;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 has 'command' => ( is => 'ro', isa => 'ArrayRef[Str]',
14 0 ▶ default => sub { [ 'facter', '--json' ] },
Subroutine __ANON__: not called CC=1 SCAR=6.9
15 1 );
16  
17 has 'config' => ( is => 'rw', lazy => 1, isa => 'HashRef',
18 0 ▶ default => sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
19 0 my $self = shift;
20 0 my ( $in, $out, $err );
21 0 ▶ IPC::Run::run($self->command, \$in, \$out, \$err )
Branch: 1 branch
BranchTrueFalseTotal
IPC::Run::run($self->command, \$in, \$out, \$err) or die "error running facter: $err" 0 0 0
22 or die("error running facter: $err");
23 0 my $data = from_json( $out );
24 0 return( $data );
25 },
26 1 );
27  
28 1 1;
29  
30 __END__
« Infrastructure/Socket.pm ↑ Summary Infrastructure/SystemUser.pm »