Branch Coverage

lib/Metadata/ByInode.pm
Criterion Covered Total %
branch 39 72 54.1


line true false branch
21 0 2 unless $$self{'abs_dbfile'} or $$self{'dbh'}
113 0 0 if DEBUG()
115 0 0 unless ($self->dbh->do('DROP TABLE metadata'))
121 0 0 unless $self->_setup_db
123 0 0 if DEBUG()
131 0 2 if DEBUG()
140 0 2 unless ($self->dbh->do($b))
149 0 2 if DEBUG()
186 2 35 unless (defined $$self{'dbh'})
187 0 2 if DEBUG()
189 0 2 unless $$self{'abs_dbfile'}
194 2 0 unless (-f $$self{'abs_dbfile'})
199 2 0 if ($$self{'dbh'} = 'DBI'->connect('dbi:SQLite:' . $$self{'abs_dbfile'}, '', '', {'RaiseError', 0, 'AutoCommit', 0})) { }
210 2 0 if ($isnew)
246 0 29 unless $arg
252 2 27 unless (defined $$self{'_open_handle'}{'replace'})
261 0 87 unless $$self{'_open_handle'}{'replace'}->execute($inode, $_, $$hash{$_})
282 0 6 unless $arg
283 0 6 unless $key
291 0 6 unless $inode
294 1 5 unless (defined $$self{'_open_handle'}{'select_by_key'})
303 0 6 unless defined $value
325 0 8 unless $inode
326 0 8 unless $inode = $self->_search_inode($inode)
329 2 6 unless (defined $$self{'_open_handle'}{'select_all'})
343 0 8 unless scalar keys %{$meta;}
389 0 15 unless $arg
391 10 5 if ($arg =~ /^\d+$/)
398 0 5 unless $abs_path =~ m[^(/.+)/([^/]+)$]
404 1 4 unless (defined $$self{'_open_handle'}{'f'})
439 0 30 unless $arg
441 1 29 unless ($arg =~ /^\d+$/)
443 0 1 unless my(@s) = stat $abs_path
480 6 0 if (defined $$self{'_open_handle'}{$handle})
493 2 0 if (defined $$self{'dbh'} and defined $$self{'_not_passed_as_argument'})
497 2 0 if ($self->_finish_open_handles)