Branch Coverage

blib/lib/Web/Scaffold.pm
Criterion Covered Total %
branch 32 210 15.2


line true false branch
116 26 0 unless exists $$specs{$defaults[$i]}
120 2 1 if (exists $$specs{$_})
121 0 2 if $$specs{$_} =~ m[^/]
122 2 0 unless $$specs{$_} =~ m[/$]
125 0 1 if (exists $$specs{'sitemapdir'})
127 0 0 if (exists $$specs{'autocheck'} and ref $$specs{'autocheck'})
129 0 0 if $_ =~ m[^/]
131 0 0 if $t > $mtime
144 0 1 unless $cols
234 0 1 unless ($_ == $cols)
260 0 1 unless exists $$pp{$page}
265 2 2 if exists $$pp{$_} and exists $$pp{$_}{'submenu'} and @{$$pp{$_}{'submenu'};}
278 0 0 if exists $$pp{$item}
285 0 0 unless $text
286 0 0 unless $status
287 0 0 if exists $$pp{$name}
314 0 0 unless exists $$pp{$page} and exists $$pp{$page}{'menu'} and @selectbar = @{$$pp{$page}{'menu'};}
316 0 0 exists $$pp{$page}{'menustripe'} ? :
322 0 0 $#selectbar ? :
329 0 0 if ($bar) { }
334 0 0 $name eq $page ? :
337 0 0 if (exists $$pp{$name} and exists $$pp{$name}{'submenu'} and @{$$pp{$name}{'submenu'};}) { }
346 0 0 if $click
347 0 0 $name eq $page || $name eq $debug ? :
378 0 0 unless exists $$pp{$page}{'trailer'}
381 0 0 if (exists $$pp{$page}{'trailer'}{'links'} and $cols = @selectbar = @{$$pp{$page}{'trailer'}{'links'};})
387 0 0 if exists $$pp{$page}{'trailer'}{'text'} and $$pp{$page}{'trailer'}{'text'}
388 0 0 if (exists $$pp{$page}{'trailer'}{'top'})
397 0 0 if ($bar) { }
402 0 0 $name eq $page ? :
408 0 0 exists $$pp{$page}{'trailer'}{'top'} ? :
412 0 0 if (exists $$pp{$page}{'trailer'}{'text'} and $$pp{$page}{'trailer'}{'text'})
413 0 0 if ($html) { }
422 0 0 if ($html and exists $$pp{$page}{'trailer'}{'bottom'})
426 0 0 unless $html
441 16 18 unless $text
442 22 12 unless $status
459 16 18 if (exists $$pp{$page}) { }
480 1 4 if (-e $file and open F, $file) { }
496 0 0 if (-e $file and open F, $file) { }
517 1 1 exists $$pp{$page}{'column'} && ref $$pp{$page}{'column'} eq 'ARRAY' ? :
536 0 2 unless exists $$pp{$page}
539 0 2 if ($page eq 'Sitemap' and exists $$specs{'sitemapdir'})
551 0 2 if ($phead)
560 0 4 if ($smn and $smn == $_) { }
584 0 0 unless exists $$pp{$page}
589 0 0 exists $$pp{$page}{'location'} ? :
595 0 0 if $tmp =~ /\n$/
607 0 9 unless defined $ENV{'REQUEST_METHOD'}
610 4 5 if ('GET' eq $tmp and defined $ENV{'QUERY_STRING'}) { }
1 4 elsif ('POST' eq $tmp and defined $ENV{'CONTENT_LENGTH'} and $ENV{'CONTENT_LENGTH'}) { }
620 0 1 if $@
633 0 12 if (exists $qhash{$key}) { }
652 0 0 unless exists $$pp{$page}
655 0 0 if ($tmp)
667 0 0 exists $$pp{$page}{'heading'} ? :
0 0 exists $$pp{$page}{'title'} ? :
676 0 0 unless $tmp
689 0 0 unless $tmp
707 0 0 unless $tmp
714 0 0 if (exists $$pp{$page}{'menu'} and ref $$pp{$page}{'menu'} eq 'ARRAY' and @{$$pp{$page}{'menu'};})
721 0 0 if ($debug) { }
729 0 0 if (exists $$pp{$page}{'trailer'} and ref $$pp{$page}{'trailer'} eq 'HASH')
757 0 0 unless opendir H, $$specs{'pagedir'}
762 0 0 unless (grep /$f$/, @files)
771 0 0 unless -e $file
773 0 0 if $mtime < $m
774 0 0 if $_ =~ /(?:meta|head)$/
775 0 0 unless open H, $file
786 0 0 if exists $$sm{$plink}
787 0 0 if (exists $$pages{$plink}) { }
0 0 elsif (not $plink =~ m[\://] || $plink =~ /\@/) { }
800 0 0 if ($isLINK) { }
807 0 0 if nosearch($specs, $pg)
828 0 0 unless $text
829 0 0 unless (exists $$sm{$link} or $link =~ m[\://]s or $link =~ /\@/s)
832 0 0 if $match =~ /$_/s
858 0 0 if (exists $$specs{'nosearch'})
860 0 0 if $pg =~ /$_/i
874 0 0 if $pg =~ m[^/]
876 0 0 unless -e $pg
878 0 0 if nosearch($specs, $pg)
882 0 0 unless open F, $pg
899 0 0 unless exists $$pages{$pg} and exists $$pages{$pg}{'menu'}
905 0 0 if (exists $$pages{$pg}{'submenu'})
908 0 0 if (exists $$pages{$pg}{'trailer'} and exists $$pages{$pg}{'trailer'}{'links'})
914 0 0 if exists $$sm{$pgname}
918 0 0 unless (exists $$pages{$pgname})
922 0 0 unless $text
923 0 0 unless $status
926 0 0 if exists $$sm{$pgname}
927 0 0 if (exists $$pages{$pgname}) { }
0 0 elsif (not $pgname =~ m[\://] || $pgname =~ /\@/) { }
943 0 0 if ($isLINK) { }
1006 0 0 $port == 80 ? :
1027 0 0 unless $m
1036 0 0 if (exists $$pp{$pg}) { }
1039 0 0 if ($pg =~ m[^/])
1067 0 0 unless exists $$specs{'sitemapdir'} and -e $$specs{'sitemapdir'} and -w $$specs{'sitemapdir'}
1072 0 0 if (-e $smf)
1075 0 0 if $pgt <= $smt
1080 0 0 unless (sysopen LOCK, $smf . '.lock', 578, $perms)
1086 0 0 unless (flock LOCK, 2)
1098 0 0 if (open F, '>' . $smf . '.tmp')
1104 0 0 if (open F, '>' . $smf . '.tmp')