Branch Coverage

blib/lib/XAO/DO/Web/Page.pm
Criterion Covered Total %
branch 224 280 80.0


line true false branch
580 19 377 ref $args->{$_} ? :
590 101 14 unless ($spec)
594 89 26 if (not $spec || defined $args->{'template'} and my $path = $args->{'path'})
596 89 0 if ($cache_allow)
614 13 102 if ($spec and ref $spec)
619 13 18 if ($spec_key eq 'param') { }
8 10 elsif ($spec_key eq 'cgi') { }
8 2 elsif ($spec_key eq 'cookie' or $spec_key eq 'cookies') { }
2 0 elsif ($spec_key eq 'proto' and $spec_list) { }
634 0 2 $self->is_secure ? :
651 107 8 wantarray ? :
672 447 683 $benchmark ? :
677 4 1126 if ($from_cache_retrieve)
680 0 4 if ($self->debug_check("render-cache-add"))
696 447 683 if ($benchmark) { }
699 208 239 if ($benchmark < 2 and $benchmark_tag and substr($benchmark_tag, 0, 2) ne "p:")
714 89 1041 if ($benchmark_tag)
716 10 79 $self->can_cache_render($args) ? :
726 3340 3695 if (exists $item->{'text'}) { }
2255 1440 elsif (exists $item->{'varname'}) { }
1440 0 elsif (exists $item->{'objname'}) { }
733 0 2255 unless defined $text
750 1384 56 unless (defined $text)
762 787 2184 if (ref $v)
763 487 300 if (@$v == 1 and exists $v->[0]{'text'}) { }
767 287 13 unless ($args_copy)
771 287 13 unless ($page_obj)
796 160 1224 if ($itemflag and $itemflag ne 't') { }
810 181 1201 if ($self->{'merge_args'})
817 5811 1222 if (defined $text)
823 43 5768 if $self->_character_mode and not $item->{'binary'}
829 1637 4174 if ($itemflag and $itemflag ne "t")
830 453 1184 if ($itemflag eq 'h') { }
0 1184 elsif ($itemflag eq 's') { }
451 733 elsif ($itemflag eq 'q') { }
731 2 elsif ($itemflag eq 'f') { }
1 1 elsif ($itemflag eq 'u') { }
1 0 elsif ($itemflag eq 'j') { }
834 0 0 defined $text && length $text ? :
860 21 7012 if $stop_after
867 4 1124 if ($from_cache_retrieve) { }
89 1035 elsif ($benchmark_tag) { }
877 89 1039 if ($benchmark_tag)
892 6922 1028 if exists $self->{'character_mode'}
894 80 948 $self->siteconfig->get('/xao/page/character_mode') ? :
906 18 3 if exists $self->{'render_cache_obj'}
912 2 1 if ($cache_name)
936 1 0 if $cache
944 0 1225 if $self->page_clipboard->{'render_cache_skip'}
946 20 1205 if $args->{'xao.cacheable'}
950 920 285 unless $path
955 132 153 unless ($cache_allow)
957 121 11 if ($cache_allow) { }
1048 28 1108 if ($args->{'pass'})
1056 20 1116 if ($self->can_cache_render($args))
1057 10 10 if (my $cache = $self->_render_cache)
1063 0 10 if ($self->debug_check("render-cache-get"))
1133 2 947 if ($@)
1136 2 0 if ($@->can('throw')) { }
1151 70 877 $chmode ? :
1245 920 210 if (defined $args->{'template'}) { }
1248 300 620 if (ref $template)
1252 60 560 &Encode::is_utf8($template) ? :
1254 565 55 if (length $tbytes < 80) { }
1255 2 563 $unparsed ? :
1258 0 55 $unparsed ? :
1265 7 203 $unparsed ? :
1271 297 533 if $cache_key_ref
1280 0 830 if ($uncached) { }
1291 587 243 unless (defined $cache_name)
1300 830 0 if (not $cache_name) { }
1311 554 276 if defined $parsed
1323 0 276 if ($self->debug_check("page-cache-size"))
1333 0 0 unless ($cache)
1364 38 238 if ($path and not defined $template)
1365 0 38 if ($self->debug_check("show-read"))
1371 0 38 unless defined $template
1378 7 269 if ($args->{'unparsed'})
1384 0 269 if ($self->debug_check("show-parse"))
1385 0 0 if ($path) { }
1393 0 0 if length $template > 20
1401 49 220 if ($self->_character_mode) { }
1412 31 18 unless (&Encode::is_utf8($template))
1417 31 0 if (&Encode::is_utf8($template, 1)) { }
1434 0 269 unless ref $parsed
1500 1946 7 unless substr($objname, 0, 5) eq "Web::"
1531 0 6597 unless @_
1534 6597 0 if (@_ == 1) { }
1542 74 6523 if (&Encode::is_utf8($text)) { }
1590 0 0 if $self->{'dbh'}
1592 0 0 if $self->{'dbh'}
1616 0 0 if $self->{'odb'}
1619 0 0 if $self->{'odb'}
1666 997 2963 unless ($clipboard)
1685 1282 2088 unless ($siteconfig)
1687 0 1282 $self->{'sitename'} ? :
1732 0 48 unless defined $secure
1737 26 22 if ($secure) { }
1738 9 17 $active ? :
1741 6 16 $active ? :
1763 31 0 if ($cgi) { }
1764 12 19 $cgi->https ? :
1767 0 0 $self->siteconfig->get('/xao/page/default_https') ? :
1812 163 49 if ($rule eq '*') { }
8 41 elsif ($rule =~ /^([\w\.]+)\s*=\s*([\w\.]+)$/) { }
9 32 elsif ($rule =~ /^([\w\.]*)\*([\w\.]*)\s*=\s*([\w\.]*)\*([\w\.]*)$/) { }
6 26 elsif ($rule =~ /^([\w\.]+)$/) { }
2 24 elsif ($rule =~ /^([\w\.]*)\*([\w\.]*)$/) { }
10 14 elsif ($rule =~ /^!([\w\.]+)$/) { }
13 1 elsif ($rule =~ /^!([\w\.]*)\*([\w\.]*)$/) { }
0 1 elsif ($rule eq '!*') { }
1 0 elsif ($rule eq '') { }
1822 43 20 unless $k =~ /$re/
1833 2 2 unless $k =~ /$re/
1845 20 18 unless $k =~ /$re/
1901 20 150 unless $pass
1906 0 150 unless ($self->{'parent'} and $pargs = $self->{'parent'}{'args'})
1913 135 15 if ($pass eq "on" or $pass eq 1)
1934 684 449 unless $self->clipboard->get("_page_benchmark_enabled")
1944 18 177 unless ($stats)
1946 17 1 if ($stats) { }
1963 0 180 unless $tag
1967 0 180 if ref $tag
1973 6 174 unless ($tagdata)
1986 180 0 wantarray ? :
2008 0 90 if ($rundata->{'started'})
2013 19 71 length $description > 100 ? :
2015 10 80 $cache_flag ? :
2038 0 90 unless ($started)
2049 0 90 if scalar @$last > 50
2127 0 79 unless $d->{'count'}
2128 24 55 if $desired_tag and $tag ne $desired_tag
2139 10 45 scalar grep({scalar keys %{$$d{'runs'}{$_}{'content'};} != 1;} keys %{$$d{'runs'};}) ? :
2145 45 10 scalar grep({not $d->{'runs'}{$_}{'cache_flag'};} keys %{$$d{'runs'};}) ? :
2164 0 0 if ($@)
2190 171 431 unless ($debug_hash)
2192 77 94 if ($debug_hash) { }
2210 3 1 $args->{$type} ? :
2221 874 361 unless ($cb_hash)
2223 732 142 if ($cb_hash) { }