CBSD/cbsd_base_dir.pm

filter: Statementstmt 71.4% 20 / 28 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 85.7% 6 / 7 Podpod 0.0% 0 / 1 totaltotal 63.4% 26 / 41 CC 3 SCAR 15.4
CC
3
Cov
62%
execute
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 4.7
« CBSD/blist.pm ↑ Summary CBSD/bdisk_list.pm »
1 #
2 # (c) Zane C. Bowers-Hadley <vvelox@vvelox.net>
3 #
4  
5 package Rex::Virtualization::CBSD::cbsd_base_dir;
6  
7 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 our $VERSION = '0.0.1'; # VERSION
11  
12 1 ▶use Rex::Logger;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 1 ▶use Rex::Helper::Run;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 1 ▶use Term::ANSIColor qw(colorstrip);
Subroutine BEGIN: called CC=1 SCAR=0.0
15 1 ▶use Rex::Commands::User;
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 0 ▶sub execute {
Subroutine execute: not called CC=3 SCAR=24.8
Pod undocumented
18 0 my ($class) = @_;
19  
20 0 Rex::Logger::debug("Geting the CBSD base dir ");
21  
22 0 my %cbsd;
23 eval{
24 0 %cbsd= get_user('cbsd');
25 0 ▶ } or do{
Branch: 1 branch
BranchTrueFalseTotal
eval { do { %cbsd = get_user("cbsd") } } or do { my $error = $@ || "Unknown failure"; die q[get_user('cbsd') died with... ] . $error } 0 0 0
26 0 ▶ my $error = $@ || 'Unknown failure';
Condition0%0/2
$@ || 'Unknown failure'
l!l
00
MC/DC0%0/1
$@ || 'Unknown failure'
$@
Truth table0%0/2
A
A= $@
Aresult
11
00
27 0 die ( "get_user('cbsd') died with... ".$error );
28 };
29  
30 0 return $cbsd{home};
31 }
32  
33 1 1;
« CBSD/blist.pm ↑ Summary CBSD/bdisk_list.pm »