File Coverage

blib/lib/Rex/Virtualization/CBSD/cbsd_base_dir.pm
Criterion Covered Total %
statement 18 26 69.2
branch 0 2 0.0
condition 0 2 0.0
subroutine 6 7 85.7
pod 0 1 0.0
total 24 38 63.1


line stmt bran cond sub pod time code
1             #
2             # (c) Zane C. Bowers-Hadley
3             #
4              
5             package Rex::Virtualization::CBSD::cbsd_base_dir;
6              
7 1     1   69787 use strict;
  1         13  
  1         34  
8 1     1   6 use warnings;
  1         2  
  1         45  
9              
10             our $VERSION = '0.0.1'; # VERSION
11              
12 1     1   515 use Rex::Logger;
  1         12665  
  1         68  
13 1     1   624 use Rex::Helper::Run;
  1         85293  
  1         81  
14 1     1   10 use Term::ANSIColor qw(colorstrip);
  1         3  
  1         944  
15 1     1   22 use Rex::Commands::User;
  1         112953  
  1         10  
16              
17             sub execute {
18 0     0 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 0         } or do{
26 0   0       my $error = $@ || 'Unknown failure';
27 0           die ( "get_user('cbsd') died with... ".$error );
28             };
29              
30 0           return $cbsd{home};
31             }
32              
33             1;