Branch Coverage

blib/lib/Text/SmartLinks.pm
Criterion Covered Total %
branch 28 136 20.5


line true false branch
376 0 0 if ($links) { }
377 0 0 if defined $self->count
379 0 0 if defined $self->print_missing
380 0 0 if defined $self->wiki
397 0 4 unless open my $in, $infile
405 5 214 if (m[L<"?http://]) { }
3 211 elsif (/^ \s* \# \s* (L<<+)/iox) { }
5 206 elsif (m[^ \s* \# \s* L< ([^/]+) / ([^/]+) >\s*$]ox) { }
10 196 elsif (m[^ \s* \# \s* L(<) ([^/]+) / ([^/]+) / (.*) ]ox) { }
1 195 elsif (/^ \s* \# \s* L
431 0 10 unless ($section)
435 2 8 if (substr($pattern, -1, 1) ne '>') { }
438 0 2 unless (s/>{$brackets}$//)
466 0 15 if ($from and $from == $to) { }
476 11 4 if $setter and $from
483 4 0 if $setter and $from
503 0 15 if ($from == $to)
508 0 15 if ($pattern and substr($pattern, -1, 1) eq '/')
526 17 6 if ($pat =~ /\G\s*"([^"]+)"/cg or $pat =~ /\G\s*'([^']+)'/cg or $pat =~ /\G\s*(\S+)/cg) { }
577 0 0 unless open my $in, $file
586 0 0 if $$self{'test_result'}
589 0 0 if $i < $from
590 0 0 if $i > $to
601 0 0 if ($file_info)
603 0 0 if (not exists $$file_info{$i}) { }
0 0 elsif ($$file_info{$i}) { }
624 0 0 unless defined $src
627 0 0 if (not $$self{'test_result'}) { }
639 0 0 if ($$self{'test_result'}) { }
640 0 0 if ($ok_count == 0 and $failed_count == 0) { }
686 0 1 unless (-e $file)
692 0 1 unless (-e $file)
695 0 1 unless ($file)
700 1 0 if (open my $fh, '<', $file)
717 0 0 if $$podtree{'_header'}
722 0 0 if ($para eq '') { }
0 0 elsif ($para =~ /^\s+/) { }
731 0 0 if $self->line_anchor
741 0 0 if (/^ =head(\d+) \s* (.*\S) \s* $/x) { }
0 0 elsif (not $section) { }
0 0 elsif (/^\s*$/) { }
0 0 elsif (/^\s+(.+)/) { }
753 0 0 if ($self->line_anchor and not $$podtree{$section}[-1] =~ /^=over\b|^=item\b/)
772 0 0 if ($yml_file)
777 0 0 if ($@)
784 0 0 if ($$data{'meat'})
794 0 0 if $case->skipped or not $case->test_line
801 0 0 $smoke_rev ? :
835 0 0 if $self->line_anchor
907 0 0 $smoke_rev ? :
912 0 0 $pugs_rev ? :
937 0 0 if ($self->test_files_missing_links)
944 0 0 if (@{$$self{'errors'};})
966 0 0 if ($ENV{'PUGS_SMARTLINKS'})
993 0 0 if (grep /^=begin pod/, @pod) { }
1015 0 0 unless ($paras)
1027 0 0 unless ($pattern)
1028 0 0 unless ($self->check)
1038 0 0 if not $para or $para =~ /\?hide_quotes=no/
1039 0 0 if ($self->process_paragraph($para) =~ /$regex/)
1040 0 0 unless ($self->check)
1048 0 0 unless ($matched)
1059 0 0 if (not $self->check)
1073 0 0 if $self->check
1075 0 0 if ($@)
1106 0 0 if (not $self->check and $self->broken_link_count > 0)
1139 0 0 if (open my $fh, '>', "$out_dir/index.html") { }
1169 0 4 if ($self->check)