Branch Coverage

blib/lib/File/Tabular/Web.pm
Criterion Covered Total %
branch 75 144 52.0


line true false branch
67 0 0 if ($request and ref($request) =~ /^Apache2/l) { }
73 0 0 if $request
98 0 1 if ($tmp = $app->{'cfg'}->get('application_dir'))
104 0 1 if $tmp = $app->{'cfg'}->get('application_name')
112 0 1 if ($tmp = $app->{'cfg'}->get('application_class'))
113 0 0 unless eval "require $tmp"
114 0 0 unless $tmp->isa($app->{'class'})
129 0 187 unless $fmt =~ /no such variable/l
179 0 1 unless $app->{'tmpl'} = 'Template'->new({'INCLUDE_PATH', \@tmpl_dirs, 'FILTERS', $self->app_tmpl_filters, 'EVAL_PERL', 1})
210 1 0 unless $ini_marker and $end_marker
283 0 9 unless my $path_info = $req->path_info
295 0 9 if $input->isa('Apache2::RequestRec')
310 0 9 unless my $mtime = (stat $app_file)[9]
314 1 8 unless ($app_initialized)
325 1 8 unless $app_initialized
361 0 9 unless @letters <= 1
371 0 9 if (not @letters and $self->{'method'} eq 'POST')
375 0 0 if defined $letter_arg
397 0 9 unless my $mtime = (stat $open_src)[9]
400 0 9 if (my $fmt = $self->{'cfg'}->get('application_mtime'))
404 2 7 $self->{'op'} =~ /delete|update/l ? :
407 0 9 if ($self->{'cfg'}->get('application_useFileCache') and $open_mode eq '<')
410 0 0 unless ($cache_entry and $cache_entry->{'mtime'} == $mtime)
411 0 0 unless open my $fh, $open_src
428 0 9 if $jFile
449 12 59 $self->{'method'} eq 'POST' ? :
452 10 61 unless defined $param_name
456 9 52 if $val
460 8 44 if (@vals)
481 10 3 if $action =~ /^(read|search|download)$/l
484 13 13 unless $_
515 8 1 if $method = $self->{'pre'}
518 5 4 if $method = $self->{'op'}
521 2 7 if $self->{'msg'}
532 0 9 unless my $view = $self->{'view'}
536 0 9 $view eq 'download' ? :
542 0 9 if $view eq 'download'
548 0 9 unless $self->{'app'}{'tmpl'}->process($tmpl_name, $vars, \$body)
571 0 4 unless $self->can_do('read')
573 0 4 unless $key
593 0 3 unless $self->can_do('search')
604 0 3 if $self->{'search_string'} =~ /^\s*$/l
609 0 3 unless my $parsedQ = $qp->parse($self->{'search_string'}, '+')
614 0 3 unless eval { do { $filter = $self->{'data'}->compileFilter($parsedQ) } }
647 0 3 if ($self->{'orderBy'})
648 0 0 unless eval { do { my $cmpfunc = $self->{'data'}->ht->cmp($self->{'orderBy'}); $self->{'results'}{'records'} = [(sort $cmpfunc @{$$self{'results'}{'records'};})] } }
659 0 3 if $start_record > $end_record
661 2 1 $self->{'results'}{'count'} ? :
668 0 3 if ($must_loop_on_records) { }
670 0 0 unless $self->can_do('read', $record)
675 0 3 unless $self->can_do('read')
686 3 0 if $prev_idx < 1
687 0 3 if $start_record > 1
691 1 2 if $next_idx <= $self->{'results'}{'count'}
718 0 1 if $req->parameters->{'orderBy'}
719 0 1 if $req->parameters->{'count'}
738 3 0 unless $self->{'logger'}
755 0 1 unless $self->can_do('add')
761 1 0 if (my $auto_num = $self->{'data'}{'autoNumField'})
777 0 1 unless $found->{'count'} == 1
783 0 1 $is_adding ? :
786 0 1 unless $self->can_do($permission, $record)
790 0 1 if ($is_adding and $self->{'cfg'}->get('fields_autoNum'))
801 0 1 $is_adding ? :
806 0 1 $is_adding ? :
808 0 1 unless (eval { do { $self->{'data'}->splices($line_nb, $to_delete, $record) } })
828 4 0 unless defined $val
829 0 0 if ($field eq $key_field and $val ne $self->key($record))
837 0 1 if $user_field
861 0 1 unless $found->{'count'} == 1
868 0 1 unless $self->can_do('delete', $record)
901 0 0 unless $self->can_do('download')