lib/Perlmazing/Perlmazing/Precompile/is_utf8.pm

filter: Statementstmt 100% 14 / 14 Branchbran 100% 6 / 6 Conditioncond 66.6% 2 / 3 MC/DCmcdc 50.0% 1 / 2 Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 92.8% 26 / 28 CC 5 SCAR 13.5
CC
5
Cov
96%
main
5.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.9
« blib/lib/Perlmazing/Perlmazing/windows_path.pm ↑ Summary blib/lib/Perlmazing/Perlmazing/get_aes_cipher.pm »
1 30 ▶use Perlmazing qw(is_empty);
Subroutine BEGIN: called CC=1 SCAR=0.0
2 30 ▶use Encode;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 7 ▶sub main ($) {
Subroutine main: called CC=5 SCAR=16.1
5 7 my $str = shift;
6 7 ▶ return '' unless not is_empty $str;
Branch: 1 branch
BranchTrueFalseTotal
if &is_empty($str) 2 5 7
7 5 my $str2 = $str;
8 5 eval {
9 5 $str = Encode::decode('utf8', $str, Encode::FB_CROAK);
10 };
11 5 ▶ return 0 if $@;
Branch: 1 branch
BranchTrueFalseTotal
if $@ 1 4 5
12 4 ▶ return 1 if defined($str) and $str2 ne $str;
Branch: 1 branch
BranchTrueFalseTotal
if defined $str and $str2 ne $str 1 3 4
Condition66%2/3
defined $str and $str2 ne $str
!ll&&!rl&&r
031
MC/DC50%1/2
defined $str and $str2 ne $str
defined $str $str2 ne $str
Truth table66%2/3
A and B
A= defined $strB= $str2 ne $str
ABresult
0X0
100
111
13 3 return 0;
14 }
15  
« blib/lib/Perlmazing/Perlmazing/windows_path.pm ↑ Summary blib/lib/Perlmazing/Perlmazing/get_aes_cipher.pm »