Branch Coverage

blib/lib/LMDB_File.pm
Criterion Covered Total %
branch 79 156 50.6


line true false branch
53 0 105 if $constname eq 'constant'
55 0 105 if ($error)
81 0 6 unless $self
82 2 4 unless ref $eflags
83 0 6 if $$eflags{'mapsize'} and $self->set_mapsize($$eflags{'mapsize'})
85 0 6 if $$eflags{'maxdbs'} and $self->set_maxdbs($$eflags{'maxdbs'})
87 0 6 if $$eflags{'maxreaders'} and $self->set_maxreaders($$eflags{'maxreaders'})
89 0 6 if ($^O =~ /openbsd/)
92 0 0 unless $$eflags{'flags'} & LMDB_File::MDB_RDONLY()
95 0 4 if $self->open($path, $$eflags{'flags'}, $$eflags{'mode'} || 384)
97 0 4 if $LMDB_File::DEBUG
103 0 0 unless my $txl = $Envs{$$self}[0]
104 0 0 if (@$txl)
113 4 2 if (my $evd = delete $Envs{$$self})
115 0 4 if (@$txl)
122 0 6 if $LMDB_File::DEBUG
131 0 14 if $LMDB_File::DEBUG
132 1 13 if @$txl
151 0 14 if not ref $parent and @$txl
154 0 14 unless $self
162 0 14 if $LMDB_File::DEBUG
168 0 1 if ($^O =~ /openbsd/)
178 3 11 unless my $td = $Txns{$$self}
179 2 9 if ($$td{'Active'} and not $$td{'RO'} and $$td{'AC'}) { }
180 0 2 if $LMDB_File::DEBUG
184 0 9 if $LMDB_File::DEBUG
193 14 0 if (my $txl = $LMDB::Env::Envs{$eid} && $LMDB::Env::Envs{$eid}[0])
197 14 0 if $$rel == $$self
199 0 14 if $LMDB_File::DEBUG > 2
201 0 14 if $LMDB_File::DEBUG > 1
207 1 9 unless ($Txns{$$self})
213 0 9 if $LMDB_File::DEBUG
219 1 5 unless my $td = $Txns{$$self}
220 0 5 unless $$td{'Active'}
223 0 5 if $LMDB_File::DEBUG
229 0 0 unless my $td = $Txns{$$self}
230 0 0 unless $$td{'Active'}
234 0 0 unless $$ntxn == $$self
240 0 0 unless my $td = $Txns{$$self}
241 0 0 unless $$td{'RO'}
242 0 0 if $$td{'Active'}
248 0 0 unless my $td = $Txns{$$self}
249 0 0 if $$td{'Active'}
256 3 13 ref $name eq 'HASH' ? :
262 3 0 if $Txns{$$self}
267 0 2 unless my $td = $Txns{$$self}
269 2 0 if @_
277 1 19 unless $Txns{$$txn}
279 0 19 unless ${$LMDB::Env::Envs{$txn->_env}[0][0];} == $$txn
281 0 15 if $dbi and $LMDB_File::DEBUG
312 0 6 unless $Cursors{$$self}
327 0 2 unless $txn->isa('LMDB::Txn')
334 2 17 $class ? :
335 0 19 unless $txn->isa('LMDB::Txn')
336 0 14 unless my $dbi = $txn->open(@_)
347 0 266 unless $txn and $LMDB::Txn::Txns{$$txn} || undef $$self[0] and $LMDB::Txn::Txns{$$txn}{'Active'}
352 0 266 unless ${$LMDB::Env::Envs{$txn->_env}[0][0];} == $$txn
359 5 0 if $txn
370 0 90 if $DEBUG > 2
376 0 28 if $DEBUG > 2
378 0 27 if @_ > 2
384 0 27 if $res and $die_on_err and $res != MDB_NOTFOUND() or undef $@
389 0 0 if $DEBUG > 2
420 0 6 unless $cursor
423 0 6 if $DEBUG
437 2 1 if ref $proto and _chkalive($proto)
440 0 1 unless ref $options
442 0 1 if (ref $mux eq 'LMDB::Txn') { }
0 1 elsif (ref $mux eq 'LMDB::Env') { }
448 0 1 if @_
462 0 7 if $res and $die_on_err and $res != MDB_NOTFOUND() or undef $@
472 0 3 unless $txn and $LMDB::Txn::Txns{$$txn} || undef $$self[0]
491 1 0 if (_get(@self, $key, $data) != MDB_NOTFOUND())
506 81 4 defined $key ? :
509 4 81 if ($res == MDB_NOTFOUND())
512 0 81 wantarray ? :
519 1 0 if (@_ > 3)
520 1 0 $_[3] ? :