Branch Coverage

blib/lib/HTML/SimpleParse.pm
Criterion Covered Total %
branch 30 38 78.9


line true false branch
18 2 2 if defined $$self{'text'} and length $$self{'text'}
24 0 0 if @_
46 26 32 if ($$text =~ /\G([^<]+)/cgs) { }
4 28 elsif ($$text =~ /\G<(!--(\#?).*?--)>/cgs) { }
2 26 elsif ($$text =~ /\G<(!.*?)>/cgs) { }
12 14 elsif ($$text =~ m[\G<(/[a-zA-Z][a-zA-Z0-9\.\-]*\s*)>]cgs) { }
12 2 elsif ($$text =~ /\G<(.*?)>/cgs) { }
54 2 2 $2 ? :
72 0 2 unless pos $$text eq length $$text
79 26 30 $type eq 'text' ? :
96 1 11 ref $self && exists $$self{'fix_case'} ? :
103 1 32 if $str =~ /\G\s+/cg
105 16 16 if ($str =~ /\G ([\w.-]+)\s*=\s* # the key (?: "([^\"\\]* (?: \\.[^\"\\]* )* )"\s* # quoted string, with possible whitespace inside, | # or '([^\'\\]* (?: \\.[^\'\\]* )* )'\s* # quoted string, with possible whitespace inside, | # or ([^\s>]*)\s* # anything else, without whitespace or > )/cgx) { }
4 12 elsif ($str =~ m[\G/?([\w.-]+)\s*]cg) { }
117 0 3 $fix_case == -1 ? :
13 3 $fix_case == 1 ? :
120 0 0 $fix_case == -1 ? :
4 0 $fix_case == 1 ? :
134 0 28 if $debug