Branch Coverage

blib/lib/Yote/Server.pm
Criterion Covered Total %
branch 85 188 45.2


line true false branch
78 0 0 if (-f $confile and -r $confile)
80 0 0 unless open IN, "<$confile"
84 0 0 if (/^\s*([^=\s]+)\s*=\s*([^\s].*)\s*$/)
85 0 0 if (defined $options->{$1}) { }
86 0 0 if defined $options->{$1}
106 0 0 if $self->{'_locker'}
110 0 0 if (not $self->{'_locker'}->ping(1))
121 0 11 unless $listener_socket
123 1 10 if (my $pid = fork)
137 1 0 if (my $pid = $self->{'server_pid'})
156 0 0 unless $listener_socket
166 0 11 if ($self->{'use_ssl'} and not $self->{'SSL_cert_file'} && $self->{'SSL_key_file'})
170 0 11 if ($self->{'args'}{'use_ssl'}) { }
173 0 0 if (index($cert_file, '/') != 0)
176 0 0 if (index($key_file, '/') != 0)
191 11 0 if $listener_socket
197 0 11 unless ($listener_socket)
206 0 11 unless ($self->{'yote_root_dir'})
208 0 0 $@ ? :
215 1 0 if $listener_socket
238 0 1 if ($sev <= $DEBUG)
240 0 0 unless open my $out, '>>/opt/yote/log/yote.log'
249 6 0 if ($r eq 'ARRAY') { }
0 0 elsif ($r eq 'HASH') { }
0 0 elsif ($r) { }
250 7 0 if $_
0 7 ref $_ ? :
253 0 0 if $_
0 0 ref $_ ? :
276 7 13 if ($r eq 'ARRAY') { }
3 10 elsif ($r eq 'HASH') { }
284 12 18 if /^[^_]/ and $data->{$_} != /^v/
288 5 6 if @outids
302 48 9 if (my $pid = fork) { }
322 9 18 unless $hdr =~ /[a-zA-Z]/
338 9 0 if ($content_length > 0 and not eof $sock)
346 0 9 if ($path =~ m[/__/])
349 0 0 if (-e $filename) { }
352 0 0 $filename =~ /css$/ ? :
378 0 9 if ($verb ne 'POST')
389 0 9 if (ref $@ eq 'HASH') { }
3 6 elsif ($@) { }
425 4 5 $token && $token ne '_' ? :
427 4 5 if ($session)
431 0 0 unless ($obj_id eq '_' or $obj_id eq $server_root_id or $id_to_last_update_time->{$obj_id})
437 1 8 if (substr($action, 0, 1) eq '_' or $action =~ /^[gs]et$/)
441 0 8 if ($params and ref $params ne 'ARRAY')
456 2 6 $obj_id eq '_' ? :
459 2 6 unless ($obj->can($action))
464 2 4 if ($session)
484 2 4 if ($session)
506 18 6 if ($session)
510 6 12 unless $id_to_last_update_time->{$should_have_id}
516 12 12 if ($needs_update)
520 4 8 if ($ref eq 'ARRAY') { }
2 6 elsif ($ref eq 'HASH') { }
535 6 6 if ($session)
616 0 8 if (ref $param eq 'HASH') { }
8 0 elsif (ref $param eq 'ARRAY') { }
0 0 elsif (ref $param) { }
624 0 0 if (index($param, 'v') != 0 and index($param, 'f') != 0 and not $session->get__has_ids2times({})->{$param})
626 0 0 if ($param)
636 19 247 unless defined $val
637 0 247 if (index($val, 'f') == 0)
639 0 0 if ($val =~ /^f(\d+)_(\d+)$/)
643 0 0 if ($file)
679 179 97 if ($r)
680 8 171 if ($allow_datastructures)
682 6 2 if (ref $val eq 'ARRAY' and not tied @$val) { }
0 4 elsif (ref $val eq 'HASH' and not tied %$val) { }
683 2 5 ref $_ ? :
686 0 0 ref $val->{$_} ? :
692 97 0 defined $val ? :
704 9 12 if $self->{'SERVER_ROOT'}
708 12 0 unless ($server_root)
758 0 6 if ($meths)
764 4 2 if ($pkg eq 'Yote::ServerObj')
770 2 0 if $class eq 'Yote::ServerObj' or $class eq 'Yote::Obj'
795 0 0 if (not defined $self->{'DATA'}{$fld} and defined $default)
796 0 0 if (ref $default)
842 4 0 if (my $session = $slots->[$i]{$token})
843 0 4 if ($i > 0)
859 0 1 if ($tries > 3)
889 0 0 if $slots->[$i]{$token}
900 0 1 if ($slot_data->[0] == $current_time_chunk) { }
952 0 0 unless ($app)
954 0 0 if ($@)
962 0 0 $self->{'SESSION'} ? :
994 0 0 unless $in_sess_id > 0
1001 0 0 if ($o2i->{$obj})
1056 0 0 if ($$accts{lc $un})
1073 0 0 if $root
1086 0 0 $acct ? :
1087 0 0 if ($acct and $pwh eq $acct->get__password_hash)