Branch Coverage

blib/lib/HTML/WebMake/Main.pm
Criterion Covered Total %
branch 6 396 1.5


line true false branch
155 0 0 unless (defined $$self{'verbose'})
162 0 0 if ($$self{'force_cache_rebuild'})
225 0 0 if (not $^O =~ /(win|os2|mac)/il) { }
279 0 0 unless ('File::Spec'->file_name_is_absolute($val))
288 0 0 if ($^O eq 'MacOS')
309 0 0 unless -d $dir
311 0 0 if ($$self{'force_cache_rebuild'})
325 0 0 if (defined $$self{'seddedtmpdir'})
333 0 0 unless -d $fname
342 0 0 if (defined $$self{'seddedcachedir'})
350 0 0 unless -d $fname
358 0 0 if (defined $$self{'cache'})
370 0 0 if (defined $$self{'et_glossary'})
418 0 0 unless open IN, "<$fname"
426 0 0 if (defined $opts and $$opts{'parse_for_cgi'})
467 0 0 if ($self->readfile($fname, {'parse_for_cgi', 1})) { }
478 0 0 if (defined $$self{'mapper'})
490 0 0 if (defined $$self{'usertags'})
510 0 0 if (defined $$attrs{'format'})
524 0 0 unless (defined $$self{'metadatas'}{$name})
539 0 0 unless (defined $$self{'contents'}{$name})
618 0 0 unless (defined $basecont)
637 0 0 if ($setthisdotmetas) { }
645 0 0 if (not defined $cont) { }
655 0 0 if ($setthisdotmetas)
677 0 0 unless (defined $obj)
690 0 0 unless defined $$self{'contents'}{$name} or defined $$self{'metadatas'}{$name}
693 0 0 if defined $already_seen{$name}
710 0 0 if $_->is_from_datasource
719 0 0 if $i++ > $shrinkby
729 0 0 unless (defined $$self{'locations'}{$name})
747 0 0 unless defined $$self{'locations'}{$name}
760 0 0 if (defined $$attrs{'all'} and $$self{'util'}->parse_boolean($$attrs{'all'})) { }
767 0 0 if (defined $root) { }
833 0 0 unless (defined $str)
834 0 0 unless (defined $from)
835 0 0 unless (defined $current_subst)
839 0 0 if ($$current_subst{'level'} > 30)
848 0 0 if ($evaluatingtags)
854 0 0 unless $$str =~ /\$[\{\(\[]/ls
856 0 0 if ($$str =~ /\$\{IMGSIZE\}/ils)
879 0 0 if ($$current_subst{'inf_loop'})
885 0 0 unless (defined $from)
888 0 0 unless ($$str =~ /(?:\$|\<\{)/l)
891 0 0 if ($tries++ > 20)
917 0 0 if (length $err > 60)
926 0 0 if ($str =~ /\$\[\]/l) { }
0 0 elsif ($str =~ /\$\{\}/l) { }
0 0 elsif ($str =~ /\$\(/l) { }
1009 0 0 if (defined $thiscont) { }
1023 0 0 if (defined $current_subst)
1028 0 0 unless (defined $dotdots)
1031 0 0 unless (defined $filename)
1034 0 0 unless (defined $outname)
1037 0 0 unless (defined $useurls)
1043 0 0 unless (defined $filename)
1044 0 0 unless (defined $outname)
1045 0 0 unless (defined $useurls)
1068 0 0 if ($$current_subst{'inf_loop'})
1072 0 0 if ($key =~ s/\?([^\?]*)$//l)
1075 0 0 if ($key =~ s/: (.*)$//l)
1086 0 0 if ($contents_only) { }
1088 0 0 unless (defined $cont)
1101 0 0 unless (defined $cont)
1106 0 0 if (defined $cont)
1109 0 0 if ($contents_only == 1)
1110 0 0 if ($cont->is_only_usable_from_deferred_refs)
1116 0 0 if ($$current_subst{'useurls'})
1122 0 0 unless (defined $str)
1133 0 0 if (defined $str)
1138 0 0 if (defined $meta)
1141 0 0 if (defined $defval) { }
1158 0 0 unless (defined $from)
1159 0 0 if ($$self{'current_subst'}{'inf_loop'})
1162 0 0 if ($key =~ s/\?([^\?]+)$//l)
1165 0 0 if ($key eq 'TOP/')
1167 0 0 unless (defined $str)
1168 0 0 if ($key =~ /\$/l)
1178 0 0 if (!defined($str) || $str eq '' and $key ne 'TOP/')
1179 0 0 if (defined $defval)
1187 0 0 unless ($str =~ m[^/]l or $str =~ /^[-_a-zA-Z0-9]:/l)
1188 0 0 if (not defined $$self{'current_subst'}{'dotdots'}) { }
1195 0 0 if ($$self{'base_href'} ne '')
1200 0 0 if ($str =~ m[/$]l) { }
1215 0 0 if $key =~ /^OUT:/l
1218 0 0 unless $key =~ /^(.*)\.([^\.]+?)$/l
1221 0 0 if ($from eq $base)
1225 0 0 if (defined $magicmeta)
1229 0 0 if ($base ne 'this')
1232 0 0 unless defined $cont
1236 0 0 if ($self->check_content_dep($cont->get_filename, $$self{'current_subst'}{'filename'}, undef) and not $$self{'force_output'})
1241 0 0 if (defined $meta)
1248 0 0 if ($cont->is_generated_content)
1258 0 0 if (defined $meta)
1265 0 0 if (defined $defval)
1267 0 0 unless ($$self{'current_subst'}{'quiet'})
1274 0 0 if (defined $defval)
1281 0 0 unless (defined $defval)
1295 0 0 unless (defined $cont)
1298 0 0 unless (defined $val)
1311 0 0 if ($key eq 'WebMake.Time')
1314 0 0 if ($key eq 'WebMake.OutFile')
1317 0 0 if ($key eq 'WebMake.OutName')
1320 0 0 if ($key eq 'WebMake.PerlLib')
1323 0 0 if ($key eq 'WebMake.SourceFiles')
1326 0 0 if ($key eq 'WebMake.GeneratedFiles')
1355 0 0 if ($^O eq 'MacOS') { }
1362 0 0 if (-d $dir . $append)
1377 0 0 unless ($$str =~ /\<\{/ls)
1393 0 0 unless ($$str =~ /\<\{/ls)
1433 0 0 unless (defined $$str)
1434 0 0 unless ($$str =~ /
1456 0 0 if (defined $$self{'perlinterp'})
1470 0 0 unless (defined $from)
1471 0 0 if ($$self{'current_subst'}{'inf_loop'})
1476 0 0 unless (defined $$self{'have_image_size_module'})
1477 0 0 if (eval 'require Image::Size;') { }
1488 0 0 unless ($$self{'have_image_size_module'} and defined $attrs)
1495 0 0 if ($fname =~ /^!!/l)
1499 0 0 if ($$self{'base_dir'} ne '')
1505 0 0 if (defined $sizestr)
1510 0 0 if (defined $sizestr)
1517 0 0 unless (defined $realfname)
1522 0 0 unless (-r $realfname)
1528 0 0 unless (eval "\n use Image::Size qw(html_imgsize);\n \$sizestr = html_imgsize(\$realfname);\n 1;")
1554 0 0 if 'File::Spec'->file_name_is_absolute($_[1])
1555 0 0 if $_[0] eq ''
1560 0 0 if 'File::Spec'->file_name_is_absolute($_[1])
1561 0 0 if $_[0] eq ''
1573 8 1 if (defined $reldir and $reldir ne '')
1584 5 14 if $fname =~ s(^\Q$dotdots\E[\/\\])[$rhs]l
1585 3 11 unless $dotdots =~ s([\/\\]([^\/\\]+)$)[]l
1611 0 0 if ('File::Spec'->file_name_is_absolute($fname))
1617 0 0 if (defined $$self{'current_subst'}{'filename'}) { }
1618 0 0 if ($$self{'base_dir'} ne '') { }
1628 0 0 if (defined $$self{'options'}{'FileSearchPath'})
1649 0 0 if (-e $realfname)
1668 0 0 if ($fname eq $HTML::WebMake::Main::SUBST_EVAL) { }
0 0 elsif ($fname eq $HTML::WebMake::Main::SUBST_DEP_IGNORE) { }
0 0 elsif ($fname eq $HTML::WebMake::Main::SUBST_META) { }
1669 0 0 if ($$self{'risky_fast_rebuild'}) { }
1687 0 0 unless (defined $$self{'file_modtimes'}{$fname})
1690 0 0 if ($fname =~ /\Q$$self{'perl_lib_dir'}\E/lo)
1722 0 0 if (defined $nowmod)
1732 0 0 if ($file =~ /^([a-zA-Z0-9]+):/l) { }
1734 0 0 unless (defined $$self{'dep_datasources'}{$proto})
1759 0 0 if ($#fnames < 0)
1767 0 0 if ($$self{'current_tick'} % 50 == 0)
1772 0 0 if ($tries++ > 3)
1785 0 0 if defined $done{$from}
1789 0 0 if (-f $to and not rename($to, $bak))
1793 0 0 unless (rename $from, $to)
1835 0 0 if ($$self{'base_dir'} ne '') { }
1841 0 0 if ($$self{'force_output'} == 0)
1842 0 0 if ($self->depend_check($fname, $outfname))
1849 0 0 unless (defined $out)
1854 0 0 unless (defined $fmt)
1862 0 0 unless ($out->use_for_content_urls)
1879 0 0 if ($txt =~ /{!!WMDEFER/l) { }
1902 0 0 if ($out->get_format =~ m[^text/html$]il)
1903 0 0 !defined($$out{'clean'}) ? :
1919 0 0 if ($outfname =~ /\$/l)
1923 0 0 if (not $$self{'making_to_string'} and $$self{'force_output'} == 0 and -f $outfname)
1926 0 0 if (-s $outfname == length $txt and open IN, "<$outfname" and $curtxt = join('', ) and close IN and $curtxt eq $txt)
1941 0 0 if ($$self{'making_to_string'}) { }
1945 0 0 unless (open OUT, ">$newfname")
1947 0 0 unless -f $newfname
1949 0 0 unless (open OUT, ">$newfname")
1954 0 0 unless (close OUT)
1970 0 0 if ($$self{'making_to_string'})
2003 0 0 if ($txt =~ /{!!WMDEFER_content_url:[^}]+}/l)
2012 0 0 if ($$self{'base_dir'} ne '') { }
2023 0 0 if ($still_have_deferreds) { }
2037 0 0 unless (defined $obj and defined($url = $obj->get_url))
2042 0 0 if ($give_up_if_still_deferred and $url =~ /^\{!!WMDEFER_content_url:/l)
2065 0 0 if ($#deps >= 0 and -f _)
2068 0 0 unless defined $dep and $dep ne ''
2070 0 0 unless ($self->check_content_dep($dep, $fname, $outmod))
2076 0 0 if ($foundadep and not $needrebuild) { }
2086 0 0 if ($fname eq $HTML::WebMake::Main::SUBST_EVAL)
2090 0 0 if ($fname eq $HTML::WebMake::Main::SUBST_DEP_IGNORE)
2092 0 0 if ($dep eq $HTML::WebMake::Main::SUBST_EVAL)
2096 0 0 if ($dep eq $HTML::WebMake::Main::SUBST_DEP_IGNORE)
2099 0 0 unless (defined $prevmod)
2103 0 0 unless (defined $nowmod)
2105 0 0 if ($HTML::WebMake::Main::DEBUG > 1 and $dep ne $HTML::WebMake::Main::SUBST_DEP_IGNORE)
2111 0 0 if ($nowmod > $prevmod)
2115 0 0 if (defined $outmod and $nowmod > $outmod)
2124 0 0 unless ($features =~ /\S/l)
2126 0 0 unless (defined $$self{'htmlcleaner'})
2127 0 0 unless (eval "\n\tuse HTML::WebMake::HTMLCleaner;\n\t\$self->{htmlcleaner} = new HTML::WebMake::HTMLCleaner(\$self);\n 1;")
2138 0 0 if ($$self{'htmlcleaner'}{'loadfailed'})
2171 0 0 if (defined $$self{'cache'})
2182 0 0 if ($HTML::WebMake::Main::HTML_LOGGING)
2193 0 0 if ($HTML::WebMake::Main::DEBUG > 0)
2195 0 0 if ($HTML::WebMake::Main::DEBUG > 1) { }
2205 0 0 if ($HTML::WebMake::Main::DEBUG > 1)
2209 0 0 if ($HTML::WebMake::Main::VERBOSE)