Condition Coverage

blib/lib/HTML/TextToHTML.pm
Criterion Covered Total %
condition 270 387 69.7


and 3 conditions

line !l l&&!r l&&r condition
1001 0 0 440 defined $para and $para ne ''
1058 268 49 123 $$self{'make_tables'} and @para_lines > 1
1067 0 149 291 not $$self{'explicit_headings'} and @para_lines > 1
149 22 269 not $$self{'explicit_headings'} and @para_lines > 1 and not $is_table
1080 230 12 198 $$self{'mailmode'} and not $is_table
242 2 196 $$self{'mailmode'} and not $is_table and not $is_custom_header
1088 383 57 0 $$self{'__mode'} & $LIST and $is_table || $is_mailheader || $is_header || $is_custom_header
1108 420 0 20 $$self{'__mode'} & $PRE and not $$self{'__mode'} & $PRE_EXPLICIT
420 20 0 $$self{'__mode'} & $PRE and not $$self{'__mode'} & $PRE_EXPLICIT and $is_table || $is_mailheader || !$self->is_preformatted($para_lines[0])
6 0 14 $$self{'__mode'} & $PRE and not $$self{'__mode'} & $PRE_EXPLICIT and $is_table || $is_mailheader || !$self->is_preformatted($para_lines[0]) and $$self{'preformat_trigger_lines'} != 0
1172 268 150 22 $$self{'make_tables'} and $is_table
1189 429 0 11 $is_mailheader and not $$self{'__mode'} & $TABLE
429 0 11 $is_mailheader and not $$self{'__mode'} & $TABLE and @para_lines
1239 642 5 519 $$self{'mailmode'} and not $$self{'__mode'} & $PRE_EXPLICIT
1251 1081 0 85 $$self{'__mode'} & $PRE and $$self{'preformat_trigger_lines'} != 0
1281 343 0 823 not $para_line_action[$i] & ($HEADER | $LIST) || $$self{'__mode'} & ($LIST | $PRE) and $$self{'__preformat_enabled'}
1326 816 49 301 $i == 0 and not $prev =~ /^\s*$/
1347 27 107 233 defined $open_tag and $open_tag eq 'p'
1353 0 432 8 $$self{'unhyphenation'} and $para =~ /[^\W\d_]\-\n\s*[^\W\d_]/s
432 0 8 $$self{'unhyphenation'} and $para =~ /[^\W\d_]\-\n\s*[^\W\d_]/s and not $$self{'__mode'} & ($PRE | $HEADER | $MAILHEADER | $TABLE | $BREAK)
1383 433 6 1 $args{'close_tags'} and $$self{'__mode'} & $LIST
1393 433 0 7 $args{'close_tags'} and $$self{'xhtml'}
1402 0 7 433 $$self{'demoronize'} and not $$self{'eight_bit_clean'}
1473 0 2 36 $$self{'infile'} and @{$$self{'infile'};}
0 0 2 $$self{'inhandle'} and @{$$self{'inhandle'};}
0 0 0 $$self{'instring'} and @{$$self{'instring'};}
1502 0 0 36 -f $source and open $inhandle, $source
1575 3 22 13 $$self{'xhtml'} and not $$self{'extract'}
25 1 12 $$self{'xhtml'} and not $$self{'extract'} and @{$$self{'__tags'};}
1585 0 12 0 @{$$self{'__tags'};} and $open_tag ne 'body'
12 0 0 @{$$self{'__tags'};} and $open_tag ne 'body' and $open_tag ne 'html'
1615 4 21 13 $print_count and not $$self{'extract'}
2076 2439 763 17 $open_tag eq 'p' and $in_tag eq 'p'
3202 3 14 $open_tag eq 'p' and $in_tag eq 'p' and $args{'tag_type'} != 2
2439 757 9 $open_tag eq 'p' and $in_tag =~ /^(hr|ul|ol|dl|pre|table|h)/
3040 86 70 $open_tag eq 'li' and $in_tag eq 'li'
3126 0 70 $open_tag eq 'li' and $in_tag eq 'li' and $args{'tag_type'} != 2
3040 16 70 $open_tag eq 'li' and $in_tag =~ /^(ul|ol)$/
3056 23 47 $open_tag eq 'li' and $in_tag =~ /^(ul|ol)$/ and $args{'tag_type'} == 2
3072 7 0 $open_tag eq 'dt' and $in_tag eq 'dd'
3079 0 0 $open_tag eq 'dt' and $in_tag eq 'dd' and $args{'tag_type'} != 2
3069 8 2 $open_tag eq 'dd' and $in_tag eq 'dt'
3077 0 2 $open_tag eq 'dd' and $in_tag eq 'dt' and $args{'tag_type'} != 2
3069 3 5 $open_tag eq 'dd' and $in_tag eq 'dl'
3072 0 5 $open_tag eq 'dd' and $in_tag eq 'dl' and $args{'tag_type'} == 2
2183 0 2444 15 defined $open_tag and $open_tag ne $in_tag
2279 38 444 320 not ${$line_ref;} =~ /^\s*$/ || ${$prev_ref;} =~ /^\s*$/ and $prev_line_len < $$self{'short_line_length'}
482 266 54 not ${$line_ref;} =~ /^\s*$/ || ${$prev_ref;} =~ /^\s*$/ and $prev_line_len < $$self{'short_line_length'} and not ${$line_action_ref;} & ($END | $HEADER | $HRULE | $LIST | $IND_BREAK | $PAR)
710 6 48 not ${$line_ref;} =~ /^\s*$/ || ${$prev_ref;} =~ /^\s*$/ and $prev_line_len < $$self{'short_line_length'} and not ${$line_action_ref;} & ($END | $HEADER | $HRULE | $LIST | $IND_BREAK | $PAR) and not ${$prev_action_ref;} & ($HEADER | $HRULE | $BREAK | $IND_BREAK)
2408 486 9 24 ${$line_ref;} =~ /^\w*>/ || ${$line_ref;} =~ /^[\|:]/ and defined $next_ref
495 0 24 ${$line_ref;} =~ /^\w*>/ || ${$line_ref;} =~ /^[\|:]/ and defined $next_ref and not ${$next_ref;} =~ /^\s*$/
2479 225 840 0 not ${$line_ref;} =~ /^\s*$/ || subtract_modes(${$line_action_ref;}, $END | $MAILQUOTE | $CAPS | $BREAK) and ${$prev_ref;} =~ /^\s*$/ || ${$line_action_ref;} & $END || $line_indent > $prev_indent + $$self{'par_indent'}
259 0 5 $is_fragment && $line_no == 0
576 5 259 not ${$line_ref;} =~ /^\s*$/ || subtract_modes(${$line_action_ref;}, $END | $MAILQUOTE | $CAPS | $BREAK) and ${$prev_ref;} =~ /^\s*$/ || ${$line_action_ref;} & $END || $line_indent > $prev_indent + $$self{'par_indent'} and not $is_fragment && $line_no == 0
806 0 0 $$self{'indent_par_break'} and not $$self{'__mode'} & ($PRE | $TABLE | $LIST)
806 0 0 $$self{'indent_par_break'} and not $$self{'__mode'} & ($PRE | $TABLE | $LIST) and not ${$prev_ref;} =~ /^\s*$/
0 0 0 $$self{'indent_par_break'} and not $$self{'__mode'} & ($PRE | $TABLE | $LIST) and not ${$prev_ref;} =~ /^\s*$/ and not ${$line_action_ref;} & $END
0 0 0 $$self{'indent_par_break'} and not $$self{'__mode'} & ($PRE | $TABLE | $LIST) and not ${$prev_ref;} =~ /^\s*$/ and not ${$line_action_ref;} & $END and ${$prev_action_ref;} & ($IND_BREAK | $PAR)
0 0 0 $$self{'indent_par_break'} and not $$self{'__mode'} & ($PRE | $TABLE | $LIST) and not ${$prev_ref;} =~ /^\s*$/ and not ${$line_action_ref;} & $END and ${$prev_action_ref;} & ($IND_BREAK | $PAR) and not subtract_modes(${$line_action_ref;}, $END | $MAILQUOTE | $CAPS)
0 0 0 $$self{'indent_par_break'} and not $$self{'__mode'} & ($PRE | $TABLE | $LIST) and not ${$prev_ref;} =~ /^\s*$/ and not ${$line_action_ref;} & $END and ${$prev_action_ref;} & ($IND_BREAK | $PAR) and not subtract_modes(${$line_action_ref;}, $END | $MAILQUOTE | $CAPS) and $line_indent > $$self{'par_indent'}
0 0 0 $$self{'indent_par_break'} and not $$self{'__mode'} & ($PRE | $TABLE | $LIST) and not ${$prev_ref;} =~ /^\s*$/ and not ${$line_action_ref;} & $END and ${$prev_action_ref;} & ($IND_BREAK | $PAR) and not subtract_modes(${$line_action_ref;}, $END | $MAILQUOTE | $CAPS) and $line_indent > $$self{'par_indent'} and $line_indent == $prev_indent
2491 259 0 0 $$self{'indent_par_break'} and not ${$prev_ref;} =~ /^\s*$/
259 0 0 $$self{'indent_par_break'} and not ${$prev_ref;} =~ /^\s*$/ and not ${$line_action_ref;} & $END
0 0 0 $$self{'indent_par_break'} and not ${$prev_ref;} =~ /^\s*$/ and not ${$line_action_ref;} & $END and $line_indent > $prev_indent + $$self{'par_indent'}
2569 195 5 4 $bullets_ordered and $number =~ /[$bullets_ordered]/
2578 0 196 8 $bullets =~ /o/ and $line =~ /^\s*o\s/
2648 13 7 8 $number ne '1' and $number ne 'a'
20 4 4 $number ne '1' and $number ne 'a' and $number ne 'A'
2763 70 0 88 $$self{'__list'}[$$self{'__listnum'} - 1] == $UL and $$para_lines_ref[$ind] =~ /^\s*[$bullets]\s*/
2776 149 0 9 $$self{'__list'}[$$self{'__listnum'} - 1] == $DL and $term
2827 291 13 592 $ind > 0 and not $$para_lines_ref[$ind - 1] =~ /^\s*$/
2835 13 264 27 $ind == 0 and $$self{'__listnum'}
277 15 12 $ind == 0 and $$self{'__listnum'} and $$para_line_indent_ref[$ind] == $$self{'__list_indent'}[$$self{'__listnum'} - 1]
2868 70 94 73 $i >= 0 and $prefix ne $$self{'__listprefix'}[$i]
2902 70 71 23 $i > 0 and $i != $$self{'__listnum'}
2913 0 2 2 $ind > 0 and $$para_lines_ref[$ind - 1] =~ /^\s*$/
0 2 0 $ind > 0 and $$para_action_ref[$ind - 1] & ($BREAK | $HEADER | $CAPS)
2969 0 116 7 $$self{'table_type'}{'DELIM'} and $self->is_delim_table(%args)
0 109 7 $$self{'table_type'}{'ALIGN'} and $self->is_aligned_table(%args)
0 105 4 $$self{'table_type'}{'PGSQL'} and $self->is_pgsql_table(%args)
0 101 4 $$self{'table_type'}{'BORDER'} and $self->is_border_table(%args)
3043 0 109 7 2 <= @rows and 2 <= @starts
3089 3 14 29 not $rows[0] =~ /\|/ and $rows[0] =~ /^\s*\w+/
3155 0 10 18 not $rows[0] =~ /\|/ and $rows[0] =~ /^\s*\w+/
3224 79 0 44 not $rows[0] =~ /[^\w\s]/ and $rows[0] =~ /^\s*\w+/
3370 0 0 7 2 <= @rows and 2 <= @starts
3485 3 0 1 not $rows[0] =~ /\|/ and $rows[0] =~ /^\s*\w+/
3613 0 4 0 not $rows[0] =~ /\|/ and $rows[0] =~ /^\s*\w+/
3743 3 3 1 not $rows[0] =~ /\|/ and $rows[0] =~ /^\s*\w+/
3939 76 4 0 not $self->is_preformatted($$para_lines_ref[$ind]) and $$self{'endpreformat_trigger_lines'} == 1 || $ind + 1 < @{$para_lines_ref;} && !$self->is_preformatted($$para_lines_ref[$ind + 1]) || $ind + 1 >= @{$para_lines_ref;}
4014 34 788 0 not ${$line_action_ref;} & $MAILQUOTE || ${$prev_action_ref;} & $MAILQUOTE and $$self{'preformat_trigger_lines'} == 0 || $self->is_preformatted(${$line_ref;}) && ($$self{'preformat_trigger_lines'} == 1 || defined $next_ref && $self->is_preformatted(${$next_ref;}))
4174 227 8 32 $prefix and not $number
4204 34 0 235 not ${$line_ref;} =~ /^\s*$/ || $self->is_ul_list_line('line', ${$line_ref;}) and defined $next_ref
34 181 54 not ${$line_ref;} =~ /^\s*$/ || $self->is_ul_list_line('line', ${$line_ref;}) and defined $next_ref and ${$next_ref;} =~ /^\s*[-=*.~+]+\s*$/
4429 2 1060 3 $$self{'caps_tag'} and $self->iscaps(${$line_ref;})
4897 37 75 0 $final_open >= 0 and $final_close < 0 || $final_open > $final_close
4933 0 0 440 $$self{'make_links'} and @{$$self{'__links_table_order'};}
5008 670 1959 11 not $$self{'__done_with_link'}[$i] and ${$line_ref;} =~ /$$self{'__search_patterns'}[$i]/
5033 0 0 0 not $$self{'__done_with_sect_link'}[$i] and ${$line_ref;} =~ /$$self{'__search_patterns'}[$i]/
5168 11 0 2 $$self{'titlefirst'} and not $$self{'title'}
5280 0 26 0 $$self{'make_links'} and -f $$self{'default_link_dict'}

or 3 conditions

line l !l&&r !l&&!r condition
765 0 26 0 ref $invocant || $invocant
1088 7 0 50 $is_table || $is_mailheader || $is_header || $is_custom_header
1108 1 13 6 $is_table || $is_mailheader || !$self->is_preformatted($para_lines[0])
1270 80 0 1086 $$self{'__mode'} & $PRE or $para_lines[$i] =~ /^\s*$/
1281 158 185 823 $para_line_action[$i] & ($HEADER | $LIST) || $$self{'__mode'} & ($LIST | $PRE)
1366 64 22 354 $$self{'__mode'} & $LIST or $$self{'__mode'} & $PRE
1495 0 0 36 not $source or $source eq '-'
1938 96 0 0 $$self{'endpreformat_trigger_lines'} != 0 || $$self{'use_preformat_marker'}
2181 2459 0 0 $in_tag ||= $open_tag
2279 20 18 764 ${$line_ref;} =~ /^\s*$/ || ${$prev_ref;} =~ /^\s*$/
2408 33 0 486 ${$line_ref;} =~ /^\w*>/ || ${$line_ref;} =~ /^[\|:]/
2479 26 199 840 ${$line_ref;} =~ /^\s*$/ || subtract_modes(${$line_action_ref;}, $END | $MAILQUOTE | $CAPS | $BREAK)
258 6 576 ${$prev_ref;} =~ /^\s*$/ || ${$line_action_ref;} & $END || $line_indent > $prev_indent + $$self{'par_indent'}
2561 115 0 1212 $line =~ /^\s*[$bullets]\s+\S/ or $line =~ /^\s*${number_match}[\.\)\]:]\s+\S/
75 0 1137 $line =~ /^\s*[$bullets]\s+\S/ or $line =~ /^\s*${number_match}[\.\)\]:]\s+\S/ or $line =~ /^\s*$term_match:$/
2902 36 34 71 not $$self{'__listnum'} or $i != $$self{'__listnum'}
2913 47 19 4 $$para_line_indent_ref[$ind] > 0 or $ind == 0
66 0 4 $$para_line_indent_ref[$ind] > 0 or $ind == 0 or $ind > 0 and $$para_lines_ref[$ind - 1] =~ /^\s*$/
2 0 2 $$para_line_indent_ref[$ind] > 0 or $ind == 0 or $ind > 0 and $$para_lines_ref[$ind - 1] =~ /^\s*$/ or $ind > 0 and $$para_action_ref[$ind - 1] & ($BREAK | $HEADER | $CAPS)
3388 10 26 33 $cell =~ / $/ || length $cell < $width
3838 137 0 784 $line =~ /\s{$pre_white_min,}\S+/o || $line =~ /\.{$pre_white_min,}\S+/o
3939 4 0 0 $$self{'endpreformat_trigger_lines'} == 1 || $ind + 1 < @{$para_lines_ref;} && !$self->is_preformatted($$para_lines_ref[$ind + 1]) || $ind + 1 >= @{$para_lines_ref;}
4014 24 10 788 ${$line_action_ref;} & $MAILQUOTE || ${$prev_action_ref;} & $MAILQUOTE
0 0 788 $$self{'preformat_trigger_lines'} == 0 || $self->is_preformatted(${$line_ref;}) && ($$self{'preformat_trigger_lines'} == 1 || defined $next_ref && $self->is_preformatted(${$next_ref;}))
4204 2 32 235 ${$line_ref;} =~ /^\s*$/ || $self->is_ul_list_line('line', ${$line_ref;})
4223 54 0 0 $lendiff <= $$self{'underline_length_tolerance'} or $offsetdiff <= $$self{'underline_offset_tolerance'}
4897 19 10 46 $final_close < 0 || $final_open > $final_close
4907 0 0 82 $final_close < 0 or $final_open > $final_close