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
102 28 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 324 1 4 $type eq 'attr' and @$attributes > 1
340 49 160 14 @tags and not ref $tags[-1]
360 20 54 73 ref $tag and $class =~ /inline|url/
74 67 6 ref $tag and $class =~ /inline|url/ and $tag->get_class eq 'block'
433 167 33 552 defined $text and length $text
439 0 523 29 $re_classic and $re_short
523 0 0 not $re_classic and $re_short
0 0 523 $re_classic and not $re_short
466 215 125 220 length $current_open_re and $before =~ s( (.*?) (\[ / ($current_open_re) \]) )[]six
546 4 0 4 defined $title && length $title
550 7 0 1 $in_url and $tag->get_class eq 'url'
597 352 15 1 $in_url && $open->get_class eq 'url'
600 199 119 50 $last and not $last->get_close
318 16 34 $last and not $last->get_close and not $close
607 365 0 3 $open->get_single and not $nested_url
706 0 8 3 $type and $errors->{$type}
769 429 5 101 defined $attr && length $attr
782 2 218 322 $self->get_strip_linebreaks and ($tree->get_class || '') eq 'block'
783 193 40 89 @$content == 1 and not ref $content->[0]
233 0 89 @$content == 1 and not ref $content->[0] and defined $content->[0]
788 133 0 60 not ref $content->[0] and defined $content->[0]
791 26 0 167 not ref $content->[-1] and defined $content->[-1]
838 1 5 364 $self->get_direct_attribute and $$text =~ s/^(=[^\]]*)?]//
853 3 101 1 $self->get_strict_attributes and not length $attr
879 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 35 3 $args ||= {}
106 1 0 $smileys->{'base_url'} || '/smileys/'
1 0 $smileys->{'format'} || '%s'
141 5 0 $url_finder->{'max_length'} || 0
194 261 14 $defs->{$key}{'class'} ||= 'inline'
230 172 135 $escape ||= 'parse'
321 200 0 $self->get_allowed || [keys %$defs]
698 7 20 $self->get_error || {}
705 9 2 $self->get_error || {}
732 1 198 $params ||= {}
742 893 213 $info ||= {'stack', [], 'tags', {}, 'classes', {}}
755 542 0 $tree->get_class or ''
763 542 0 $tree->get_attr || []
768 343 199 $tree->get_type || 'classic'
782 540 0 $tree->get_class || ''
896 14 329 $auto_closed || 0

or 3 conditions

line l !l&&r !l&&!r condition
796 204 298 40 not exists $defs->{$name}{'parse'} or $parse
838 364 2 4 $self->get_direct_attribute and $$text =~ s/^(=[^\]]*)?]// or $$text =~ s/^( [^\]]*)?\]//