Branch Coverage

blib/lib/Games/FEAR/Log.pm
Criterion Covered Total %
branch 0 128 0.0


line true false branch
36 0 0 if (ref $args ne 'HASH')
41 0 0 if (not exists $$args{'-logfile'} && defined $$args{'-logfile'}) { }
49 0 0 if ($temp_arg ne 'SCALAR' and $temp_arg ne 'GLOB' and $temp_arg ne '')
62 0 0 unless (exists $$args{'-dbi'} and defined $$args{'-dbi'})
69 0 0 if (ref $dbh ne 'ARRAY' or $#{$dbh;} != 2)
78 0 0 unless (exists $Games::FEAR::Log::_QUERIES{$temp_arg})
84 0 0 unless $dbh = 'DBI'->connect($$dbh[0], $$dbh[1], $$dbh[2], {'PrintError', 0, 'PrintWarn', 0, 'RaiseError', 1, 'AutoCommit', 0})
93 0 0 unless (exists $$args{'-create'} and defined $$args{'-create'})
100 0 0 unless ($temp_arg)
109 0 0 unless (exists $$args{'-table'} and defined $$args{'-table'} and $$args{'-table'} =~ /\A[a-z0-9_]+\z/)
122 0 0 if ($@ ne '')
124 0 0 if ($@ =~ /table .+ exist/imsx) { }
127 0 0 unless ($create_of{$new_object->ident})
134 0 0 unless $dbh->do(_build_query('ddl', $temp_arg))
138 0 0 if ($@ ne '')
153 0 0 unless (exists $$args{'-history'} and defined $$args{'-history'})
160 0 0 unless (defined $temp_arg)
169 0 0 unless (exists $$args{'-truncate'} and defined $$args{'-truncate'})
176 0 0 if ($temp_arg != 0)
192 0 0 unless (defined $logfile_of{$self->ident})
206 0 0 if (ref $logfile eq 'SCALAR') { }
0 0 elsif (ref $logfile eq 'GLOB') { }
217 0 0 if (copy($logfile, $tempfile) != 1)
225 0 0 unless (-e $logfile)
230 0 0 if (copy($logfile, $tempfile) != 1)
237 0 0 if ($truncate_of{$self->ident} == 1)
239 0 0 if (ref $logfile eq 'SCALAR') { }
0 0 elsif (ref $logfile eq 'GLOB') { }
250 0 0 if ($@ ne '')
255 0 0 unless ($return_val)
262 0 0 unless open my $trunc_file, '>', $logfile
270 0 0 if ($duration != 0)
273 0 0 unless $dbh->do(_build_query('remove_expired', $table_of{$self->ident}), undef, $duration)
278 0 0 unless $dbh->commit
282 0 0 if ($@ ne '')
297 0 0 if ($line =~ /] \*+? Results for Map/i)
302 0 0 if ($line =~ /] Team: Team (\d)/i)
307 0 0 if ($line =~ /\[(.+?)] Player: ([^ ]+) \(uid: (.+?)\)/i)
318 0 0 if ($line =~ /] $stat: (\d+)/i)
325 0 0 if ($line =~ /] objective: (\d+)/i)
333 0 0 unless ($count) = $dbh->selectrow_array(_build_query('test_dml', $table_of{$self->ident}), $session{'timestamp'}, $session{'uid'})
341 0 0 if ($count < 1)
345 0 0 unless $dbh->do(_build_query('dml', $table_of{$self->ident}), $session{'timestamp'}, $session{'uid'}, $session{'player'}, $session{'team'}, $session{'score'}, $session{'kills'}, $session{'deaths'}, $session{'teamkills'}, $session{'suicides'}, $session{'objective'})
361 0 0 if ($@ ne '')
375 0 0 unless $dbh->commit
379 0 0 if ($@ ne '')
403 0 0 if ($@ ne '')
409 0 0 if (defined $dbh->err)
435 0 0 if ($@ ne '')
441 0 0 if (defined $dbh->err)
467 0 0 if ($@ ne '')
473 0 0 if (defined $dbh->err)
500 0 0 if ($@ ne '')
506 0 0 if (defined $dbh->err)
533 0 0 if ($@ ne '')
539 0 0 if (defined $dbh->err)
555 0 0 unless defined $offset
556 0 0 unless $offset =~ /^[0-9]+$/
559 0 0 unless defined $length
560 0 0 unless $offset =~ /^[0-9]+$/
566 0 0 if ($length) { }
645 0 0 if ($span =~ /\A \+? (\d+) ($span_types) \z/msx) { }
0 0 elsif ($span eq '0') { }
663 0 0 if (exists $Games::FEAR::Log::_QUERIES{'mysql'}{$queryname})