| 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
Condition33%1/3
$Rex::Helper::File::Spec::OSNAME eq "MSWin32" and not Rex::is_ssh()
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()
| |||||||||||||||||||||||||||||
| 25 | 0 | $file_spec_flavor = 'File::Spec::Win32'; | |||||||||||||||||||||||||||
| 26 | } | ||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | 3580 | return $file_spec_flavor->$method(@args); | |||||||||||||||||||||||||||
| 29 | } | ||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||
| 31 | 108 | 1; | |||||||||||||||||||||||||||