blib/lib/Rex/Helper/File/Spec.pm

filter: Statementstmt 94.4% 17 / 18 Branchbran 50.0% 1 / 2 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 79.3% 23 / 29 CC 3 SCAR 8.0
CC
3
Cov
83%
AUTOLOAD
3.4
BEGIN
1.0
BEGIN
1.0
CRAP 2.2
« lib/Rex/Commands/PkgConf.pm ↑ Summary lib/Rex/Cron/SunOS.pm »
1 #
2 # (c) Jan Gehring <jan.gehring@gmail.com>
3 #
4  
5 package Rex::Helper::File::Spec;
6  
7 108 ▶use v5.14.4;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 108 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 108 our $VERSION = '1.16.1'; # VERSION
11  
12 108 ▶use English qw(-no_match_vars);
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 108 require File::Spec::Unix;
15 108 require File::Spec::Win32;
16  
17 3580 ▶sub AUTOLOAD { ## no critic (ProhibitAutoloading)
Subroutine AUTOLOAD: called CC=3 SCAR=12.3
18 3580 my ( $self, @args ) = @_;
19  
20 3580 ( my $method ) = our $AUTOLOAD =~ /::(\w+)$/msx;
21  
22 3580 my $file_spec_flavor = 'File::Spec::Unix';
23  
24 3580 ▶ if ( $OSNAME eq 'MSWin32' && !Rex::is_ssh() ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Rex::Helper::File::Spec::OSNAME eq "MSWin32" and not Rex::is_ssh()) 0 3580 3580
Condition33%1/3
$Rex::Helper::File::Spec::OSNAME eq "MSWin32" and not Rex::is_ssh()
!ll&&!rl&&r
358000
MC/DC0%0/2
$Rex::Helper::File::Spec::OSNAME eq "MSWin32" and not Rex::is_ssh()
$Rex::Helper::File::Spec::OSNAME eq "MSWin32" not Rex::is_ssh()
Truth table33%1/3
A and not(B)
A= $Rex::Helper::File::Spec::OSNAME eq "MSWin32"B= not Rex::is_ssh()
ABresult
0X0
100
111
25 0 $file_spec_flavor = 'File::Spec::Win32';
26 }
27  
28 3580 return $file_spec_flavor->$method(@args);
29 }
30  
31 108 1;
« lib/Rex/Commands/PkgConf.pm ↑ Summary lib/Rex/Cron/SunOS.pm »