Condition Coverage

blib/lib/WebDyne/Compile.pm
Criterion Covered Total %
condition 79 146 54.1


and 3 conditions

line !l l&&!r l&&r condition
423 18 12 2 my $perl_ar = $meta{'perl'} and not $param_hr->{'noperl'}
448 28 0 0 @filter and not $param_hr->{'nofilter'}
703 228 0 0 $static_fg and $subst_fg
729 79 81 52 $data_ar->[2] && grep({ref $_;} @{$$data_ar[2];})
942 13 13 32 not $WebDyne::Compile::CGI_TAG_WEBDYNE{$html_tag} || $WebDyne::Compile::CGI_TAG_IMPLICIT{$html_tag} and $data_uppr_ar
26 1 31 not $WebDyne::Compile::CGI_TAG_WEBDYNE{$html_tag} || $WebDyne::Compile::CGI_TAG_IMPLICIT{$html_tag} and $data_uppr_ar and not $subst_fg
14 0 13 $WebDyne::Compile::CGI_TAG_WEBDYNE{$html_tag} and $data_uppr_ar
14 13 0 $WebDyne::Compile::CGI_TAG_WEBDYNE{$html_tag} and $data_uppr_ar and $static_fg
14 1 12 not $data_uppr_ar and $html_tag
1042 31 33 108 @data_uppr and not ref $data_chld_ar
64 32 76 @data_uppr and not ref $data_chld_ar and not ref $data_uppr[$#data_uppr]
1134 12 13 37 $data_chld_ix and not ref $data[$data_chld_ix]
25 13 24 $data_chld_ix and not ref $data[$data_chld_ix] and not ref $data[$data_chld_ix - 1]
1252 182 0 16 $html_or->{'_code'} and $attr{'perl'}
1308 69 15 0 $html_child_or =~ /^\s*$/ and $html_tag ne "pre"
84 0 0 $html_child_or =~ /^\s*$/ and $html_tag ne "pre" and $html_tag ne "textarea"
15 0 0 $html_child_or =~ /^\s*$/ and $html_tag ne "pre" and $html_tag ne "textarea" and not $WebDyne::Compile::WEBDYNE_COMPILE_NO_SPACE_COMPACTING

or 2 conditions

line l !l condition
100 2 0 'WebDyne::HTML::Tiny'->new('mode', $WebDyne::Compile::WEBDYNE_HTML_TINY_MODE, 'r', $r) || (return err('unable to get new WebDyne::HTML::Tiny object'))
153 36 0 $self->{'_r'} || $self->r || (return err())
158 36 0 'IO::File'->new($html_cn, 0) || (return err("unable to open file $html_cn, $!"))
180 36 0 $self->html_tiny || (return err('unable to get html_tiny_or ref'))
186 36 0 'WebDyne::HTML::TreeBuilder'->new('api_version', 3, 'html_tiny_or', $html_tiny_or, 'r', $r) || (return err('unable to create HTML::TreeBuilder object'))
230 36 0 $tree_or->parse_fh($html_fh) || (return err())
312 36 0 $self->find_node({'data_ar', $data_ar, 'tag', 'head'}) || (return err())
319 36 0 $self->find_node({'data_ar', $head_ar->[0], 'tag', 'meta', 'all_fg', 1}) || (return err())
329 113 0 $tag_ar->[1] || (next)
341 1 0 $self->subst_attr(undef, {$name, $value}) || (return err())
345 0 0 $meta{'static'} ||= 1
368 0 0 $meta{'static'} ||= 1
457 0 0 $self->$filter($data_ar, \%meta) || (return err())
469 24 0 $self->optimise_one($data_ar) || (return err())
480 20 0 $self->optimise_two($data_ar) || (return err())
611 24 0 $self->{'_html_tiny_or'} || $self->html_tiny || (return err('unable to get CGI object from self ref'))
652 204 0 &$compile_cr($compile_cr, $data_chld_ar) || (return err())
713 0 0 $self->WebDyne::subst_attr(undef, $attr_hr) || (return err())
751 0 0 $self->$html_tag($data_ar, $attr_hr) || (return err())
768 160 0 eval { do { $attr_hr = undef unless keys %{$attr_hr;}; if ($html_tiny_or->can($html_tag)) { '???'; $html_tiny_or->$html_tag(grep({$_;} $attr_hr, join(undef, @data_child))); } else { '???'; $html_tiny_or->tag($html_tag, grep({$_;} $attr_hr, join(undef, @data_child))); } } } || (return errsubst("CGI tag '<$html_tag>': %s", $@ || sprintf("undefined error rendering tag '${html_tag}', attr_hr:%s, data_child:%s", Dumper($attr_hr, \@data_child))))
824 24 0 &$compile_cr($compile_cr, $data_ar) || (return err())
866 20 0 $self->{'_html_tiny_or'} || $self->html_tiny || (return err('unable to get CGI object from self ref'))
909 45 0 &$compile_cr($compile_cr, $data_chld_ar, $data_ar) || (return err())
1072 0 0 $self->render_data_ar('data', [$data_ar]) || (return err())
1291 337 0 $self->parse($html_child_or, $meta_hr) || (return err())

or 3 conditions

line l !l&&r !l&&!r condition
95 2 0 0 $opt{'filename'} || $opt{'srce'}
136 31 5 0 ref($self)->{'_compile_init'} ||= do { return err() unless $self->compile_init }
299 36 0 0 $self->parse($tree_or, \%meta) || do { return err(&$close_cr()) }
444 0 0 28 $self->{'_filter'} || $r->dir_config('WebDyneFilter')
475 4 0 20 $param_hr->{'stage3'} or $param_hr->{'opt1'}
486 4 0 16 $param_hr->{'stage4'} or $param_hr->{'opt2'}
681 0 1 227 $data_ar->[3] || delete $attr_hr->{'subst'} || grep({push @subst_oper, $1 if $_ =~ /([\$\@%!+*^])\{(\1?)(.*?)\2\}/;} values %{$attr_hr;})
721 0 1 212 $WebDyne::Compile::CGI_TAG_WEBDYNE{$html_tag} || $WebDyne::Compile::CGI_TAG_FORM{$html_tag} || $subst_fg
212 0 16 not $WebDyne::Compile::CGI_TAG_WEBDYNE{$html_tag} || $WebDyne::Compile::CGI_TAG_FORM{$html_tag} || $subst_fg or $static_fg
930 0 0 57 $data_ar->[3] || delete $attr_hr->{'subst'} || grep({$_ =~ /([\$\@%!+*^])\{(\1?)(.*?)\2\}/so;} values %{$attr_hr;})
942 13 0 45 $WebDyne::Compile::CGI_TAG_WEBDYNE{$html_tag} || $WebDyne::Compile::CGI_TAG_IMPLICIT{$html_tag}
14 0 1 $data_uppr_ar || $html_tag
985 0 0 0 $@ || "undefined error rendering tag '${_}'"
1103 0 0 0 $@ || "undefined error rendering tag '${_}'"
1180 13 0 0 &$compile_cr($compile_cr, $data_ar, undef) || err()