Branch Coverage

blib/lib/Nes.pm
Criterion Covered Total %
branch 48 372 12.9


line true false branch
94 74 0 unless $class
127 0 1 if $ENV{'MOD_PERL'}
150 0 0 if $$self{'CFG'}{'tmp_clear'}
160 0 0 if 1 < rand 100
170 0 0 if length $$self{'tmp_dir'} < 4
173 0 0 if length $$self{'tmp_suffix'} < 4
177 0 0 if ($file =~ /$$self{'tmp_suffix'}$/)
179 0 0 unless $file =~ /tmp/
181 0 0 if time - $last_mod > $$self{'expired'}
194 0 0 unless (-d $$self{'tmp_dir'})
199 0 0 unless -d $dir
200 0 0 unless (-d $dir)
207 0 0 unless open my $fh, '>>', $$self{'file'}
217 0 0 unless -e $$self{'file'}
219 0 0 unless open my $fh, '<', $$self{'file'}
231 0 0 unless -e $$self{'file'}
233 0 0 unless open my $fh, '>', $$self{'file'}
234 0 0 if $data
244 0 0 unless ($id)
246 0 0 if $ENV{'HTTP_X_REMOTE_ADDR'} and !$id || $id =~ /^(127|192)\./
488 0 0 if $name
497 0 0 if $class
527 0 0 if $cookie =~ /_delete$/
530 0 0 unless $cookie =~ /_delete$/
540 1 0 unless $$self{'c_get'}{$name}
541 0 0 unless $pass
558 0 0 unless $pass
570 0 0 unless $path
573 0 0 if $domain
581 0 0 unless $path
594 2 0 unless $ENV{'HTTP_COOKIE'}
599 0 0 unless $value
600 0 0 if $value eq 'deleted'
656 1 0 unless $$self{'sess'}
660 0 0 if time > $expire
661 0 0 if $session_name ne $$self{'session_prefix'}
672 0 0 unless $pass
688 0 0 unless $$self{'user'}
714 0 0 if $$self{'top_container'}{'php_wrapper'} and $clength > $$self{'CFG'}{'tmp_upload'} * 1024 and $$self{'CFG'}{'tmp_upload'}
721 0 1 if $$self{'save_buffer'}
722 0 1 if $$self{'top_container'}{'php_wrapper'}
743 0 0 unless $$self{'CGI'}
761 0 0 unless $$self{'q_CGI'}
781 0 0 unless $fh
837 0 0 unless $$self{'CGI'}
839 0 0 if ($ENV{'REQUEST_METHOD'} ne 'GET')
840 0 0 if $$self{'CGI'}->raw_saved(\$buffer, 8192)
849 0 0 unless $$self{'CGI'}
851 0 0 if ($ENV{'REQUEST_METHOD'} ne 'GET')
905 1 0 if $file
925 0 1 if $$self{'file'} =~ /php$/i
972 1 0 if ($this_dir =~ m[^/]) { }
984 1 0 if ($file_path =~ m[^([-\@\w.\\/]+)$])
1041 0 0 if $ENV{'HTTP_X_REMOTE_ADDR'} and !$ENV{'REMOTE_ADDR'} || $ENV{'REMOTE_ADDR'} =~ /^(127|192|169|10)\./
1094 0 0 unless $par
1098 0 0 if $key =~ /^$par/
1123 0 1 unless $$self{'top_container'}{'max_inter'}--
1156 1 8 if $$self{'souce_types'}{$type} =~ /[\,\s]?${extension}[\,\s]?/i
1159 1 0 if ($$self{'type'} eq 'html') { }
0 0 elsif ($$self{'type'} eq 'nsql') { }
0 0 elsif ($$self{'type'} eq 'php') { }
0 0 elsif ($$self{'type'} eq 'perl') { }
0 0 elsif ($$self{'type'} eq 'txt') { }
0 0 elsif ($$self{'type'} eq 'bash') { }
0 0 elsif ($$self{'type'} eq 'python') { }
0 0 elsif ($$self{'type'} eq 'js') { }
1193 1 0 if (open my $fh, '<', "$$self{'file_name'}") { }
1196 1 0 if $$self{'file_souce'}[$#{$$self{'file_souce'};}]
1260 1 0 if $$self{'file_souce'}[0] =~ /$Nes::Tags::start\s*$Nes::Tags::nes/i or ''
1267 1 0 if ($param[0])
1279 0 1 unless $script
1280 0 1 if $script eq 'none'
1312 0 0 unless ($$self{'nes'}{'debug_info'}{'is_load'})
1313 0 0 unless ($$self{'content_obj'}{'is_binary'})
1321 0 0 if $$self{'nes'}{'print_out'}
1379 0 1 if $$self{'tags'}{'HTTP-headers'}
1416 0 0 if ($self_file eq $top_file)
1441 0 0 if ($self_file eq $top_file)
1474 0 0 if ($script eq 'none')
1475 0 0 unless $$self{'top_container'}{'max_scripts'}--
1482 0 0 if ($script)
1493 0 0 unless $$self{'top_container'}{'max_scripts'}--
1499 0 0 unless $$self{'top_container'}{'in_inc'}{$script_dir}
1503 0 0 unless ($return)
1506 0 0 if $@ =~ /ModPerl::Util::exit/
1508 0 0 if $@
1509 0 0 unless defined $return
1510 0 0 unless $return
1519 0 0 if ($$self{'nes'}{'debug_info'}{'obj'}{'location'})
1535 0 0 unless $status
1539 0 0 if ($$self{'nes'}{'debug_info'}{'is_load'}) { }
1636 0 0 if @{$$self{'file_script'};}
1645 0 0 if defined $old_fh
1679 0 0 if @{$$self{'file_script'};}
1681 0 0 unless -e $$self{'CFG'}{'shell_cline'}
1683 0 0 if ($Nes::MOD_PERL) { }
1685 0 0 if $$self{'nes'}{'debug_info'}{'is_load'}
1699 0 0 if $$self{'nes'}{'debug_info'}{'is_load'}
1700 0 0 if $error
1704 0 0 if $$self{'nes'}{'debug_info'}{'is_load'}
1718 0 0 if $$self{'nes'}{'debug_info'}{'is_load'}
1719 0 0 if $error
1748 0 0 if $$self{'file_name'} eq $$self{'top_container'}{'file'}
1761 0 0 unless $$self{'php_wrapper'}
1764 0 0 if $$self{'php_wrapper'}
1768 0 0 if ($$self{'php_wrapper'} or $Nes::MOD_PERL)
1778 0 0 if ($Nes::MOD_PERL) { }
1780 0 0 if $$self{'nes'}{'debug_info'}{'is_load'}
1789 0 0 if ($$self{'php_wrapper'}) { }
1790 0 0 if ($ENV{'REQUEST_METHOD'} ne 'GET')
1791 0 0 if ($$self{'query'}{'save_buffer'}) { }
1811 0 0 if $$self{'nes'}{'debug_info'}{'is_load'}
1812 0 0 if $error
1816 0 0 if $$self{'nes'}{'debug_info'}{'is_load'}
1825 0 0 if ($$self{'php_wrapper'}) { }
1826 0 0 if ($ENV{'REQUEST_METHOD'} ne 'GET')
1827 0 0 if ($$self{'query'}{'save_buffer'}) { }
1849 0 0 if $$self{'nes'}{'debug_info'}{'is_load'}
1850 0 0 if $error
1854 0 0 if ($$self{'php_wrapper'})
1857 0 0 unless $$self{'is_binary'}
1868 0 0 if ($$self{'nes'}{'debug_info'}{'obj'}{'location'})
1878 0 0 unless $$self{'TAG_HTTP-headers'}
1909 0 0 if @{$$self{'file_script'};}
1916 0 0 if ($Nes::MOD_PERL) { }
1918 0 0 if $$self{'nes'}{'debug_info'}{'is_load'}
1932 0 0 if $$self{'nes'}{'debug_info'}{'is_load'}
1936 0 0 if $$self{'nes'}{'debug_info'}{'is_load'}
1950 0 0 if $$self{'nes'}{'debug_info'}{'is_load'}
2011 2 1 if $out
2185 0 3 unless $params
2209 3 0 if $this
2210 3 0 if $this
2212 3 0 unless ($skip_inclusion)
2213 0 3 if ($this =~ /$$self{'pre_start'}/)
2217 0 3 if ($this =~ /$$self{'tag_start'}/)
2235 0 2 if ($tag =~ /^$$self{'tag_expre'}$/) { }
0 2 elsif ($tag =~ /^$$self{'tag_tpl'}$/) { }
0 2 elsif ($tag =~ /^$$self{'tag_sql'}$/) { }
0 2 elsif ($tag =~ /^$$self{'tag_hash'}$/) { }
0 2 elsif ($tag =~ /^$$self{'tag_include'}$/) { }
2 0 elsif ($tag =~ /^$$self{'tag_var'}$/) { }
0 0 elsif ($tag =~ /^$$self{'tag_env'}$/) { }
0 0 elsif ($tag =~ /^$$self{'tag_plugin'}$/) { }
2284 0 2 if $value =~ /^\d*$/
2294 0 0 if ($key =~ /^yes_tag_(.*)/) { }
2297 0 0 if $key =~ /^yes_/i
2302 2 0 unless $$self{'security_options'}{'no_br'}
2304 0 2 if $$self{'security_options'}{'no_sql'}
2305 2 0 if $$self{'security_options'}{'no_nes'}
2306 2 0 if $$self{'security_options'}{'no_html'}
2320 0 1 if !$block =~ /$$self{'tag_start'}\s*$$self{'tag_nes'}/
2342 1 1 if ($$self{'nes'}{'debug_info'})
2343 0 1 unless exists $$self{'tags'}{$var}
2353 0 0 if ($expre =~ /$$self{'pre_start'}/)
2369 0 0 if ($tag =~ /^:-:var:-:$/)
2371 0 0 if (defined $$self{'tags'}{$var}) { }
2381 0 0 if ($tag =~ /^:-:env:-:$/)
2383 0 0 if (defined $$self{'top_container'}{'nes_env'}{$var}) { }
2395 0 0 if eval $expre
2409 0 0 unless ($file)
2446 0 0 unless (exists $$self{'tags'}{$name_hash})
2451 0 0 if ($name_hash =~ /$$self{'tag_field'}/)
2473 0 0 unless $sql =~ /^SELECT/
2480 0 0 if ($sql =~ /$$self{'pre_start'}/)
2495 0 0 if ($$self{'container'}{'type'} eq 'nsql')
2513 0 0 if ($$self{'nes'}{'debug_info'})
2537 0 0 if ($$self{'nes'}{'debug_info'})
2538 0 0 unless exists $$self{'tags'}{$name}
2570 0 0 if $var =~ /^q_/
2571 0 0 if $var =~ /^q_/
2574 0 0 if ref $var eq 'ARRAY'
2575 0 0 if ref $var eq 'HASH'
2592 0 0 if ($tag =~ /^$tag_plugin$/i)
2594 0 0 unless ($handler)
2725 0 2 unless $value
2733 0 2 if (not $tags) { }
2746 0 2 unless $value
2777 0 0 unless $value
2809 0 0 if ($Nes::MOD_PERL2)
2822 0 0 if ($Nes::MOD_PERL2)
2835 0 0 if ($Nes::MOD_PERL2)
2842 0 0 if ($Nes::MOD_PERL1)
2855 0 0 if $ref eq 'SCALAR' or $ref eq 'REF'
2856 0 0 if $ref eq 'HASH'
2857 0 0 if $ref eq 'ARRAY'