Branch Coverage

blib/lib/MojoX/Session.pm
Criterion Covered Total %
branch 57 100 57.0


line true false branch
54 100 0 if @_ == 0
62 136 0 if @_ == 0
76 0 17 if (defined $rv)
77 0 0 if ref $rv
82 17 0 unless $args
89 9 31 unless $instance
91 0 31 if (ref $instance eq 'HASH') { }
0 31 elsif (ref $instance eq 'ARRAY') { }
17 14 elsif (not ref $instance) { }
115 1 19 if ($self->ip_match)
121 20 0 if ($self->transport)
128 0 20 if $cb
137 0 19 if ref $sid eq 'CODE'
143 19 0 if ($self->transport)
147 7 12 unless ($sid)
149 0 2 $cb ? :
2 5 unless $sid
152 0 17 if ($self->store->is_async) { }
157 0 0 if ($store->error)
159 0 0 $cb ? :
164 0 0 if $cb
173 0 17 if $self->store->error
178 6 11 unless $sid
188 5 12 unless (defined $expires and defined $data)
189 5 0 if $self->transport
197 2 10 if ($self->ip_match)
198 0 2 unless $self->_remote_addr
200 0 2 unless $self->data($PRIVATE_IP_FIELD)
202 1 1 unless $self->_remote_addr eq $self->data($PRIVATE_IP_FIELD)
216 0 1 $cb ? :
1 24 unless $self->sid and not $self->_is_flushed
218 2 22 if ($self->is_expired and $self->_is_stored) { }
219 0 2 if ($self->store->is_async) { }
225 0 0 if (my $error = $store->error)
227 0 0 $cb ? :
233 0 0 if $cb
249 19 3 $self->_is_new ? :
253 0 22 if ($self->store->is_async) { }
260 0 0 if ($store->error)
262 0 0 $cb ? :
268 0 0 $cb ? :
276 0 22 unless ($ok)
292 39 21 if (@_ == 0)
296 11 10 if (@_ == 1)
310 0 2 unless $key
321 1 2 if ($key) { }
336 2 0 if ($self->transport)
348 4 88 if (defined $val)
361 3 0 if ($self->transport)
372 7 24 time > $self->expires ? :