Branch Coverage

blib/lib/Data/Session.pm
Criterion Covered Total %
branch 96 162 59.2


line true false branch
33 132 2 if (defined $atime)
51 1 131 if ($self->etime and $self->atime + $self->etime < time)
53 1 0 if $self->verbose
68 242 1 if (not $name) { }
1 0 elsif (ref $name ne 'ARRAY') { }
104 0 1 if (not $q->can('cookie')) { }
0 1 elsif ($self->expired) { }
1 0 elsif (my($t) = $self->expire) { }
166 0 0 if $heading
170 0 0 if (ref $$data{$key} eq 'HASH') { }
199 2 4 unless (@arg)
204 2 2 if ($#arg == 0) { }
211 2 0 if ($$data{'_SESSION_ETIME'} != $time)
235 1 1 if $time == 0
237 1 0 if (not $$data{'_SESSION_PTIME'}{$key} or $$data{'_SESSION_PTIME'}{$key} ne $time)
245 1 1 if ($modified)
262 92 243 if ($self->modified and not $self->deleted)
272 0 335 if $self->verbose > 1
290 0 251 if $#driver < 0
292 0 251 if $self->verbose > 1
310 0 251 if $#id_generator < 0
312 0 251 if $self->verbose > 1
330 0 251 if $#serializer < 0
332 0 251 if $self->verbose > 1
347 1 0 if ($cookie) { }
369 0 251 unless is_class_loaded($class)
371 0 251 if $self->verbose > 1
375 0 251 if $self->verbose > 1
388 0 251 unless is_class_loaded($class)
390 0 251 if $self->verbose > 1
394 0 251 if $self->verbose > 1
404 40 0 unless (defined $q)
411 0 40 if (not $name) { }
0 40 elsif (ref $name ne 'ARRAY') { }
435 119 35 unless ($self->query)
441 0 119 unless is_class_loaded($class)
443 0 119 if $self->verbose > 1
447 0 119 if $self->verbose > 1
463 0 251 unless is_class_loaded($class)
465 0 251 if $self->verbose > 1
469 0 251 if $self->verbose > 1
480 0 251 if $self->verbose > 1
482 137 114 if ($id) { }
486 0 137 if $self->verbose > 1
488 5 132 if (not $raw_data) { }
498 0 132 if ($self->verbose > 1)
510 0 132 if $self->verbose > 1
516 0 132 if $self->verbose > 1
526 1 0 if ($time and $self->atime + $time < time)
538 0 132 if $self->verbose > 1
546 0 251 if $self->verbose > 1
600 5 114 $id ? :
624 242 450 if ($#arg < 0) { }
283 167 elsif ($#arg == 0) { }
641 0 167 if $key =~ /^_/
651 40 127 unless $$data{$key} or $arg{$key}
653 0 0 if (not $$data{$key} and $arg{$key} or $$data{$key} and not $arg{$key} or $$data{$key} ne $arg{$key})
675 0 251 if $self->verbose > 1
688 0 753 unless $default{$key}
701 0 753 unless (exists $options{$required})
705 0 0 if $self->verbose
710 0 753 unless $options{$required}
714 251 502 if ($required eq 'driver') { }
251 251 elsif ($required eq 'id') { }
251 0 elsif ($required eq 'serialize') { }
716 251 0 if ($driver{lc $options{$required}}) { }
727 251 0 if ($id_generator{lc $options{$required}}) { }
738 251 0 if ($serializer{lc $options{$required}}) { }
754 0 251 if ($self->verbose > 1)
782 0 40 unless (defined $q)
789 0 40 if (not $name) { }
0 40 elsif (ref $name ne 'ARRAY') { }
837 114 137 unless ($id)
844 114 0 if ($q->can('cookie')) { }
848 0 114 if $self->verbose > 1
854 0 0 if $self->verbose > 1
857 114 0 unless ($id)
873 0 251 if ($self->id_option eq 'Static' and not $self->id)
886 1 6 unless $time
888 4 2 if $time =~ /\d$/
890 0 6 unless $time =~ /^([-+]?\d+)([smhdwMy])$/