Branch Coverage

blib/lib/BenchmarkAnything/Storage/Frontend/Lib.pm
Criterion Covered Total %
branch 33 178 18.5


line true false branch
18 4 0 unless $self->{'noconfig'}
19 4 0 unless $self->{'noconnect'}
42 0 0 if defined &reftype($_)
57 0 0 if defined &reftype($v)
69 0 0 unless defined $result
71 0 0 if ($opt->{'fb'})
74 0 0 if (not defined &reftype($result)) { }
0 0 elsif (&reftype($result) eq 'ARRAY') { }
0 0 elsif (&reftype($result) eq 'HASH') { }
80 0 0 $fi ? :
81 0 0 if (not defined &reftype($entry)) { }
0 0 elsif (&reftype($entry) eq 'ARRAY') { }
0 0 elsif (&reftype($entry) eq 'HASH') { }
99 0 0 if (not defined &reftype($entry)) { }
0 0 elsif (&reftype($entry) eq 'ARRAY') { }
0 0 elsif (&reftype($entry) eq 'HASH') { }
126 0 0 &reftype($result) eq 'ARRAY' ? :
129 0 0 unless defined $opt->{'separator'}
142 0 0 if ($outtype eq 'yaml') { }
0 0 elsif ($outtype eq 'json') { }
0 0 elsif ($outtype eq 'ini') { }
0 0 elsif ($outtype eq 'dumper') { }
0 0 elsif ($outtype eq 'xml') { }
0 0 elsif ($outtype eq 'flat') { }
185 5 0 if ($backend eq 'local') { }
0 0 elsif ($backend eq 'http') { }
192 0 5 if $self->{'debug'}
196 0 5 unless my $dbh = 'DBI'->connect($dsn, $user, $password, {'RaiseError', 1, 'mysql_auto_reconnect', 1})
209 0 5 keys %$searchengine ? :
216 0 0 if not $ua->get($url)->res->code or $ua->get($url)->res->code != 200
228 0 0 if ($backend eq 'local')
230 0 0 if ($self->{'dbh'})
231 0 0 unless $self->{'dbh'}{'AutoCommit'}
247 7 0 if ($self->{'really'})
249 7 0 if ($self->{'really'} eq $dsn) { }
262 0 0 if $answer and $answer =~ /^y(es)?$/i
273 7 0 if ($self->_are_you_sure)
286 0 7 unless my($scheme, $driver, $attr_string, $attr_hash, $driver_dsn) = 'DBI'->parse_dsn($dsn)
291 0 7 if $dbname
295 0 7 unless (@results)
311 1 0 if ($backend eq 'local') { }
336 1 0 if ($backend eq 'local') { }
355 3 0 if ($backend eq 'local') { }
379 0 0 if (-d $home_ba) { }
381 0 0 if $self->{'verbose'}
394 0 0 if (not -e $dest_file) { }
405 0 0 if $self->{'verbose'}
406 0 0 unless open my $CFGFILE, '>', $dest_file
412 0 0 if $self->{'verbose'}
418 0 0 if (not -e $dbfile) { }
420 0 0 if $self->{'verbose'}
428 0 0 if $self->{'verbose'}
431 0 0 if ($self->{'verbose'})
438 0 0 if ($we_created_db) { }
469 0 8 unless ($data)
474 8 0 unless ($self->{'skipvalidation'})
476 0 8 if $self->{'verbose'}
477 0 8 unless (my $result = BenchmarkAnything::Schema::valid_json_schema($data))
486 8 0 if ($backend eq 'local') { }
0 0 elsif ($backend eq 'http') { }
489 0 8 if ($self->{'queuemode'}) { }
492 0 0 if $self->{'verbose'} or $self->{'debug'}
497 0 8 if $self->{'verbose'} or $self->{'debug'}
501 0 58 if $self->{'debug'}
505 0 8 unless ($success)
509 0 8 if $self->{'verbose'} or $self->{'debug'}
544 0 1 unless ($query or $value_id)
550 5 0 if ($backend eq 'local') { }
0 0 elsif ($backend eq 'http') { }
553 1 4 if $value_id
561 0 0 if ($value_id) { }
568 0 0 if $res->error
584 3 0 if ($backend eq 'local') { }
0 0 elsif ($backend eq 'http') { }
586 2 1 defined $pattern ? :
594 0 0 if $res->error
613 0 0 if ($backend eq 'local') { }
0 0 elsif ($backend eq 'http') { }
615 0 0 defined $pattern ? :
623 0 0 if $res->error
642 1 0 if ($backend eq 'local') { }
0 0 elsif ($backend eq 'http') { }
652 0 0 if $res->error
671 0 0 if ($backend eq 'local')
687 0 0 unless $lock = $lockmgr->trylock('/tmp/process_raw_result_queue')
692 0 0 if ($backend eq 'local') { }
717 0 0 if ($backend eq 'local') { }
734 0 0 if ($backend eq 'local') { }
752 0 0 unless $value_id