| 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
| |||||||||||||
| 26 | 0 | ▶ | my $error = $@ || 'Unknown failure'; | ||||||||||
|
Condition0%0/2
$@ || 'Unknown failure'
MC/DC0%0/1
$@ || 'Unknown failure'
$@
Truth table0%0/2
A
A= $@
| |||||||||||||
| 27 | 0 | die ( "get_user('cbsd') died with... ".$error ); | |||||||||||
| 28 | }; | ||||||||||||
| 29 | |||||||||||||
| 30 | 0 | return $cbsd{home}; | |||||||||||
| 31 | } | ||||||||||||
| 32 | |||||||||||||
| 33 | 1 | 1; | |||||||||||