Condition Coverage

blib/lib/Parse/BBCode.pm
Criterion Covered Total %
condition 102 125 81.6


and 3 conditions

line !l l&&!r l&&r condition
101 27 0 1 $smileys and ref $$smileys{'icons'} eq 'HASH'
145 0 1 1 $max_url and length $title > $max_url
185 80 0 8 not exists $$def{'code'} and exists $$def{'output'}
256 287 1 4 $type eq 'attr' and @$attributes > 1
335 49 152 14 @tags and not ref $tags[-1]
355 15 40 71 ref $tag and $class =~ /inline|url/
55 65 6 ref $tag and $class =~ /inline|url/ and $tag->get_class eq 'block'
428 159 33 511 defined $text and length $text
434 0 482 29 $re_classic and $re_short
482 0 0 not $re_classic and $re_short
0 0 482 $re_classic and not $re_short
461 207 106 207 length $current_open_re and $before =~ s( (.*?) (\[ / ($current_open_re) \]) )[]six
529 4 0 4 defined $title && length $title
541 7 0 1 $in_url and $tag->get_class eq 'url'
585 323 11 1 $in_url && $open->get_class eq 'url'
588 191 109 35 $last and not $last->get_close
300 11 24 $last and not $last->get_close and not $close
595 332 0 3 $open->get_single and not $nested_url
693 0 8 3 $type and $$errors{$type}
756 396 5 94 defined $attr && length $attr
769 2 210 290 $self->get_strip_linebreaks and ($tree->get_class || '') eq 'block'
770 175 40 75 @$content == 1 and not ref $$content[0]
215 0 75 @$content == 1 and not ref $$content[0] and defined $$content[0]
775 119 0 56 not ref $$content[0] and defined $$content[0]
778 20 0 155 not ref $$content[-1] and defined $$content[-1]
825 1 5 331 $self->get_direct_attribute and $$text =~ s/^(=[^\]]*)?]//
840 3 94 1 $self->get_strict_attributes and not length $attr
866 3 93 1 $self->get_strict_attributes and length $attr
96 1 0 $self->get_strict_attributes and length $attr and $attr =~ tr/ /\000-\037!-\377/c

or 2 conditions

line l !l condition
28 34 3 $args ||= {}
102 1 0 $$smileys{'base_url'} || '/smileys/'
1 0 $$smileys{'format'} || '%s'
140 5 0 $$url_finder{'max_length'} || 0
193 260 14 $$defs{$key}{'class'} ||= 'inline'
229 172 133 $escape ||= 'parse'
316 192 0 $self->get_allowed || [keys %$defs]
685 7 18 $self->get_error || {}
692 9 2 $self->get_error || {}
719 1 190 $params ||= {}
729 823 200 $info ||= {'stack', [], 'tags', {}, 'classes', {}}
742 502 0 $tree->get_class or ''
750 502 0 $tree->get_attr || []
755 311 191 $tree->get_type || 'classic'
769 500 0 $tree->get_class || ''
883 14 298 $auto_closed || 0

or 3 conditions

line l !l&&r !l&&!r condition
783 196 266 40 not exists $$defs{$name}{'parse'} or $parse
825 331 2 4 $self->get_direct_attribute and $$text =~ s/^(=[^\]]*)?]// or $$text =~ s/^( [^\]]*)?\]//