Branch Coverage

blib/lib/BBCode/Parser.pm
Criterion Covered Total %
branch 70 110 63.6


line true false branch
195 0 0 if (defined $_[0] and $_[0] =~ /^([\w-]*)$/) { }
223 0 87 if (@_) { }
252 0 6 if defined $DEFAULT
330 0 6 unless ref $this
338 2 4 if @_
373 0 145 unless exists $SETTINGS{$key}
374 0 145 unless exists $$this{$key}
377 8 129 if wantarray
378 129 0 if @ret == 1
396 0 5 unless exists $SETTINGS{$key}
398 0 5 unless defined $val
412 168 0 if $class eq "BBCode::Tag::$tag"
474 1 876 if $$this{'_forbid'}->contains($_)
475 269 607 if $$this{'_permit'}->contains($_)
489 3 719 if ($$ref =~ s/^\\//)
490 0 3 unless $$ref =~ s/^(.)//s
491 3 0 unless $1 eq "\n"
495 59 660 if (not defined $k and $$ref =~ s/^\s*=\s*//)
496 26 33 if ($arg) { }
506 18 642 if ($$ref =~ s/^(["'])//)
510 18 233 if $$ref =~ s/^\Q$q\E//
511 3 230 if ($$ref =~ s/^\\//)
512 0 3 unless $$ref =~ s/^(.)//s
513 0 3 unless $1 eq "\n"
517 0 230 $1 eq "\n" ? :
519 0 18 unless $qok
524 44 598 if ($$ref =~ s/^\s*\]//)
525 44 0 if $arg
530 27 571 if ($$ref =~ s/^(\s+|\s*,\s*)//)
531 16 11 if $arg
543 0 44 unless $ok
544 44 0 if wantarray
553 128 158 if ($$ref =~ s/^ ([^\[\]<&]+) //x)
558 0 158 if ($$ref =~ s/^ \[ \s* \] //x)
562 0 158 if ($$ref =~ s/^ \[ \[ //x)
566 0 158 if ($$ref =~ s/^ \] \] //x)
572 2 156 if ($$ref =~ s/^ \[ \s* HTML \s* \] //xi)
579 2 154 if ($$ref =~ s(^ \[ \s* (/?) \s* \* \s* \] )[]x)
584 110 44 if ($$ref =~ s(^ \[ ( \s* /? \s* \w+ \s* ) \] )[]x)
587 110 0 if (tagExists $tag) { }
595 0 44 if ($$ref =~ s(^ \[ \s* / \s* \] )[]x)
600 44 0 if ($$ref =~ s/^ \[ ( \s* \w+ \s* ) (?= \s | , | = | \] )//x)
604 44 0 if (tagExists $tag) { }
612 0 0 if ($$ref =~ s/^ ]*) > //x)
615 0 0 if (defined($url = parseURL $text)) { }
0 0 elsif (defined($url = parseMailURL $text)) { }
629 0 0 if ($$ref =~ s/^ & ( \#? [\w+-]+ ) ; //x)
630 0 0 if (defined parseEntity($1)) { }
658 62 207 if ($$token[0] =~ s[^/][])
662 61 1 if ($$token[0] eq $top->Tag or $$token[0] eq '')
676 197 2 unless $@
677 0 2 unless $@ =~ /^Invalid tag nesting/
680 0 197 unless @st
682 65 132 if $tag->BodyPermitted
700 0 61 unless ref $this