Branch Coverage

blib/lib/String/Util.pm
Criterion Covered Total %
branch 48 96 50.0


line true false branch
102 1 1 if (defined $val)
147 2 9 unless (defined $val)
152 5 4 if ($val =~ /\S/su)
193 1 4 unless (defined $s)
214 1 1 unless (defined $s)
226 1 1 unless (defined $s)
262 2 1 if (defined $val)
293 1 1 if (defined $val) { }
318 0 0 if (hascontent($val)) { }
345 0 1 unless (defined $str)
402 4 0 if (defined $val)
403 3 1 unless my $found = $val =~ s/^\`(.*)\`$/$1/su or $val =~ s/^\"(.*)\"$/$1/su
407 0 4 if ($opts{'braces'} and not $found)
408 0 0 unless $val =~ s/^\[(.*)\]$/$1/su or $val =~ s/^\((.*)\)$/$1/su
432 0 0 if (ref $val and overload::Overloaded($val))
437 0 0 unless defined $val
574 0 1 unless defined $count
577 0 1 if ($count =~ /^dict/isu)
595 0 0 unless ($line_num =~ /^([0-9]+)$/su)
606 0 0 if ($opts{'letters_only'})
607 0 0 unless ($word =~ /^[a-z]+$/su)
612 0 0 if ($opts{'maxlength'})
613 0 0 if (length $word > $opts{'maxlength'})
618 0 0 unless (defined $opts{'encode'} and not $opts{'encode'})
627 0 1 if ($opts{'alpha'}) { }
635 1 0 unless defined $opts{'strip_vowels'}
641 0 23 if ($opts{'numerals'}) { }
650 3 20 if $opts{'strip_vowels'} and $char =~ /[aeiouy]/iu
691 4 4 if (defined $str1 and defined $str2)
696 2 0 unless (defined $str1 or defined $str2)
728 2 2 eqq(@_) ? :
732 0 0 eqq(@_) ? :
747 0 0 if defined $line
748 0 0 if defined wantarray
833 0 0 if (not $opts{'convert_spaces'} and $char =~ /^\s$/su)
837 0 0 unless ($opts{'alpha_nums'})
838 0 0 if ($char =~ /^[a-z0-9]$/isu)
845 0 0 if ($show_chars)
911 1 4 unless (defined $str)
915 0 4 unless ($substr)
941 1 4 unless (defined $str)
945 0 4 unless ($substr)
971 1 4 unless (defined $str)
975 0 4 unless ($substr)
1005 1 2 unless (defined $str)
1040 0 4 unless (defined $str)
1072 0 2 unless open my $fh, '<', $file
1079 1 1 if ($ret_array)