Branch Coverage

blib/lib/CGI/WebToolkit.pm
Criterion Covered Total %
branch 0 364 0.0


line true false branch
48 0 0 if $$self{'allowclearcache'} == 1 and defined param($$self{'clearcacheparam'})
54 0 0 unless defined $workflow_function_name
65 0 0 if ref $result ne 'HASH' or not exists $$result{'type'}
69 0 0 if ($$result{'type'} eq 'output') { }
0 0 elsif ($$result{'type'} eq 'followup') { }
70 0 0 if (exists $$result{'status'} and $$result{'status'} == 1) { }
72 0 0 unless exists $$result{'mimetype'}
74 0 0 unless exists $$result{'content'}
80 0 0 if ($mimetype eq 'text/html')
96 0 0 unless exists $$result{'function_name'}
100 0 0 if exists $$result{'arguments'}
111 0 0 if (exists $ENV{'SCRIPT_NAME'})
120 0 0 if ($mimetype eq 'text/html')
140 0 0 if $$self{'checkrights'} == 1 and not $self->allowed($function_name)
145 0 0 if ($$self{'cachetable'} ne '')
148 0 0 if defined $result
151 0 0 unless (exists $$self{'workflow_function_cache'}{$function_name})
156 0 0 if (defined $function_filename) { }
158 0 0 unless exists $$self{'workflow_function_cache'}{$function_name}
172 0 0 if $@
177 0 0 if $@
188 0 0 if ($$self{'cachetable'} ne '')
198 0 0 unless defined $status
199 0 0 unless defined $info
200 0 0 unless defined $content
201 0 0 unless defined $mimetype
226 0 0 if $$self{'sessiontable'} eq ''
228 0 0 if (exists $$self{'session'}{$varname}) { }
238 0 0 if $$self{'sessiontable'} eq ''
240 0 0 defined $value ? :
247 0 0 if $$self{'sessiontable'} eq ''
249 0 0 if exists $$self{'session'}{$name}
260 0 0 ref $data eq 'ARRAY' ? :
265 0 0 if (defined $filename1) { }
0 0 elsif (defined $filename2) { }
267 0 0 unless exists $$self{'template_function_cache'}{$template_name}
273 0 0 unless exists $$self{'template_function_cache'}{$template_name}
283 0 0 if ($template_name =~ /^([^\:]+)\:(.*)$/)
295 0 0 if -f $filename
299 0 0 unless open TMPLFILE, '<' . $filename
311 0 0 if $$self{'allowmacros'} == 1
333 0 0 unless defined $phrase
335 0 0 if $$self{'phrasetable'} eq ''
338 0 0 unless defined $language
339 0 0 unless defined $language
348 0 0 if (my $row = $query->fetchrow_hashref) { }
349 0 0 if ($$row{'language'} eq $language) { }
355 0 0 defined $translation ? :
368 0 0 if (defined $language)
374 0 0 defined $lang ? :
382 0 0 if $$self{'phrasetable'} eq ''
385 0 0 if scalar(@pairs) % 2 == 1 or scalar @pairs < 4
407 0 0 if (my $row = $query->fetchrow_hashref) { }
478 0 0 defined $$opts{'distinct'} ? :
0 0 scalar @columns ? :
0 0 scalar keys %{$$opts{'where'};} ? :
0 0 scalar keys %{$$opts{'wherelike'};} ? :
0 0 scalar @joins ? :
0 0 scalar @group ? :
0 0 scalar @order ? :
0 0 $$opts{'limit'} > 0 ? :
541 0 0 scalar keys %{$$opts{'where'};} ? :
0 0 scalar keys %{$$opts{'wherelike'};} ? :
565 0 0 scalar keys %{$$opts{'where'};} ? :
0 0 scalar keys %{$$opts{'wherelike'};} ? :
580 0 0 unless exists $$record{'id'}
590 0 0 if (my $row = $query->fetchrow_hashref) { }
610 0 0 unless $query->execute
620 0 0 unless defined $regex
622 0 0 defined $value && $value =~ /$regex/ ? :
630 0 0 if $$self{'usertable'} eq ''
632 0 0 unless defined $loginname
633 0 0 unless defined $password
635 0 0 if $$self{'usertable'} eq ''
647 0 0 if (my $user = $query->fetchrow_hashref) { }
648 0 0 if $$user{'active'} == 0
654 0 0 if $$user{'ui_language'} ne ''
667 0 0 if $$self{'usertable'} eq ''
682 0 0 if $$self{'accessconfig'} eq ''
693 0 0 if ($function_name =~ /$rgx/)
700 0 0 unless exists $$self{'access_function_cache'}{$check_function_name}
719 0 0 unless $msg =~ /\r?\n$/
724 0 0 unless defined $priority and scalar grep({$_ eq uc $priority;} 'DEBUG', 'INFO', 'WARNING', 'ERROR', 'FATAL')
731 0 0 if (defined $$self{'current_workflow_function'})
755 0 0 unless defined $file
770 0 0 unless open UPLOAD, '>' . $filepath . $filename
787 0 0 if ($bytes_written > $$self{'uploadmaxsize'})
802 0 0 if ($$info{'status'} == 1)
825 0 0 if ($function_name eq 'DESTROY') { }
0 0 elsif ($function_name =~ /^\_[^\_]/) { }
0 0 elsif ($function_name =~ /^[A-Z]/) { }
836 0 0 if $@
837 0 0 if ($is_sub)
841 0 0 if $@
842 0 0 scalar @result ? :
0 0 wantarray ? :
851 0 0 unless (defined $template_name)
864 0 0 length $theme ? :
903 0 0 if $t >= scalar @{$tokens;}
907 0 0 if (not ref $token) { }
913 0 0 if ($type eq 'start' or $type eq 'single') { }
0 0 elsif ($type eq 'end') { }
919 0 0 if ($type eq 'start') { }
0 0 elsif ($type eq 'single') { }
922 0 0 unless (defined $t_span)
958 0 0 if $abort == 100
970 0 0 if (ref $token) { }
971 0 0 $$token[0] eq 'end' ? :
0 0 $$token[0] eq 'end' ? :
0 0 $$token[0] eq 'single' ? :
1005 0 0 unless ref $$tokens[$s]
1006 0 0 if ($$tokens[$s][1] eq $$tokens[$t][1])
1007 0 0 if ($$tokens[$s][0] eq 'start') { }
0 0 elsif ($$tokens[$s][0] eq 'end') { }
1011 0 0 if ($open <= 0) { }
1021 0 0 $found ? :
1031 0 0 if (not ref $_) { }
0 0 elsif ($$_[0] eq 'start') { }
0 0 elsif ($$_[0] eq 'end') { }
0 0 elsif ($$_[0] eq 'single') { }
1065 0 0 if ($tag =~ /$tagregex/s) { }
1069 0 0 unless defined $space
1070 0 0 unless defined $attribs
1071 0 0 unless defined $is_single
1072 0 0 unless defined $rest
1074 0 0 if (scalar grep({$tagname eq $_;} @XHTML_TAGS)) { }
1076 0 0 ref $tokens[-1] ? :
1080 0 0 if (length $is_end) { }
0 0 elsif (length $is_single) { }
1092 0 0 ref $tokens[-1] ? :
1096 0 0 ref $tokens[-1] ? :
1107 0 0 if (-f $datafilename and -r $datafilename) { }
1108 0 0 unless open DATAFILE, '<' . $datafilename
1117 0 0 if (defined $current_id and defined $current_field and $line =~ /^[\s\t]/) { }
1123 0 0 if ($line =~ /^\[(\d+)\][\s\t\n\r]*$/) { }
0 0 elsif ($line =~ /^(\w+)[\s\t]*([\:\.])(.*)\n\r?$/) { }
1125 0 0 if (defined $current_id)
1138 0 0 if ($type eq ':') { }
1149 0 0 if (defined $current_id)
1176 0 0 if $language eq $find_language
1190 0 0 if (-f $cfgfile) { }
1209 0 0 $_ eq $$self{'idparam'} || $_ eq $$self{'clearcacheparam'} ? :
1230 0 0 if (my $entry = $query->fetchrow_hashref) { }
1257 0 0 if $$self{'cachetable'} eq ''
1264 0 0 unless open OUTFILE, '>>' . $filename
1274 0 0 if (scalar @_ and ref $_[0] eq 'CGI::WebToolkit') { }
1295 0 0 unless defined $use_like
1303 0 0 $use_like == 1 ? :
1317 0 0 unless return $$self{'dbh'}->quote(@args)
1330 0 0 if (scalar @parts == 1) { }
1357 0 0 if (-f $filename) { }
1368 0 0 unless defined $suffix
1382 0 0 unless -f $filename
1383 0 0 unless -r $filename
1386 0 0 unless open PERLFILE, '<' . $filename
1393 0 0 if $@
1401 0 0 if $$self{'sessiontable'} eq ''
1407 0 0 unless defined $$self{'session_id'}
1418 0 0 if (my $session = $query->fetchrow_hashref) { }
1419 0 0 if (time - $$session{'last_update'} < $$self{'sessiontimeout'}) { }
1439 0 0 if $sessionstart and $$self{'onsessionstart'} ne ''
1446 0 0 if $$self{'sessiontable'} eq ''
1455 0 0 if (my $session = $query->fetchrow_hashref) { }
1488 0 0 unless length $string
1491 0 0 if $@
1498 0 0 if defined $$self{'dbh'}
1500 0 0 unless $$self{'dbh'} = 'DBI'->connect('DBI:' . $$self{'engine'} . ':' . $$self{'name'} . ':' . $$self{'host'}, $$self{'user'}, $$self{'password'}, {})
1594 0 0 if ($name eq 'config')
1604 0 0 if not scalar @{$$self{'templatefallbacks'};} or $$self{'templatefallbacks'}[-1] ne 'core'
1619 0 0 exists $ENV{'SCRIPT_NAME'} ? :
0 0 exists $ENV{'SCRIPT_NAME'} ? :
0 0 exists $ENV{'SCRIPT_NAME'} ? :
1648 0 0 unless open CFGFILE, '<' . $filename
1651 0 0 if (defined $defaults)
1658 0 0 if /^[\s\t\n\r]*$/
1661 0 0 defined $defaults ? :
1665 0 0 if (/$rgx/)
1670 0 0 if (defined $defaults) { }
1671 0 0 if (ref $$defaults{$key} eq 'ARRAY') { }
1673 0 0 if exists $$defaults{$key}
1678 0 0 if exists $$defaults{$key}
1708 0 0 if exists $$defaults{$cleankey}