Condition Coverage

blib/lib/Parse/BBCode.pm
Criterion Covered Total %
condition 101 125 80.8


and 3 conditions

line !l l&&!r l&&r condition
102 27 0 1 $smileys and ref $smileys->{'icons'} eq 'HASH'
146 0 1 1 $max_url and length $title > $max_url
186 80 8 0 not exists $def->{'code'} and exists $def->{'output'}
257 322 1 4 $type eq 'attr' and @$attributes > 1
336 49 159 14 @tags and not ref $tags[-1]
356 20 54 73 ref $tag and $class =~ /inline|url/
74 67 6 ref $tag and $class =~ /inline|url/ and $tag->get_class eq 'block'
429 166 33 550 defined $text and length $text
435 0 521 29 $re_classic and $re_short
521 0 0 not $re_classic and $re_short
0 0 521 $re_classic and not $re_short
462 214 125 219 length $current_open_re and $before =~ s( (.*?) (\[ / ($current_open_re) \]) )[]six
539 4 0 4 defined $title && length $title
542 7 0 1 $in_url and $tag->get_class eq 'url'
586 351 15 1 $in_url && $open->get_class eq 'url'
589 198 119 50 $last and not $last->get_close
317 16 34 $last and not $last->get_close and not $close
596 364 0 3 $open->get_single and not $nested_url
694 0 11 0 $type and $errors->{$type}
757 427 5 101 defined $attr && length $attr
770 2 217 321 $self->get_strip_linebreaks and ($tree->get_class || '') eq 'block'
771 192 40 89 @$content == 1 and not ref $content->[0]
232 0 89 @$content == 1 and not ref $content->[0] and defined $content->[0]
776 132 0 60 not ref $content->[0] and defined $content->[0]
779 26 0 166 not ref $content->[-1] and defined $content->[-1]
826 1 5 363 $self->get_direct_attribute and $$text =~ s/^(=[^\]]*)?]//
841 3 101 1 $self->get_strict_attributes and not length $attr
867 3 100 1 $self->get_strict_attributes and length $attr
103 0 1 $self->get_strict_attributes and length $attr and $attr =~ tr/ /\000-\037!-\377/c

or 2 conditions

line l !l condition
29 34 3 $args ||= {}
106 1 0 $smileys->{'base_url'} || '/smileys/'
1 0 $smileys->{'format'} || '%s'
141 5 0 $url_finder->{'max_length'} || 0
194 260 14 $defs->{$key}{'class'} ||= 'inline'
230 172 133 $escape ||= 'parse'
317 199 0 $self->get_allowed || [keys %$defs]
686 7 20 $self->get_error || {}
693 9 2 $self->get_error || {}
720 1 197 $params ||= {}
730 890 212 $info ||= {'stack', [], 'tags', {}, 'classes', {}}
743 540 0 $tree->get_class or ''
751 540 0 $tree->get_attr || []
756 342 198 $tree->get_type || 'classic'
770 538 0 $tree->get_class || ''
884 14 328 $auto_closed || 0

or 3 conditions

line l !l&&r !l&&!r condition
784 203 297 40 not exists $defs->{$name}{'parse'} or $parse
826 363 2 4 $self->get_direct_attribute and $$text =~ s/^(=[^\]]*)?]// or $$text =~ s/^( [^\]]*)?\]//