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
289 0 251 if $#driver < 0
291 0 251 if $self->verbose > 1
308 0 251 if $#id_generator < 0
310 0 251 if $self->verbose > 1
327 0 251 if $#serializer < 0
329 0 251 if $self->verbose > 1
355 1 0 if ($cookie) { }
377 0 251 unless is_class_loaded($class)
379 0 251 if $self->verbose > 1
383 0 251 if $self->verbose > 1
396 0 251 unless is_class_loaded($class)
398 0 251 if $self->verbose > 1
402 0 251 if $self->verbose > 1
412 40 0 unless (defined $q)
419 0 40 if (not $name) { }
0 40 elsif (ref $name ne 'ARRAY') { }
443 119 35 unless ($self->query)
449 0 119 unless is_class_loaded($class)
451 0 119 if $self->verbose > 1
455 0 119 if $self->verbose > 1
471 0 251 unless is_class_loaded($class)
473 0 251 if $self->verbose > 1
477 0 251 if $self->verbose > 1
488 0 251 if $self->verbose > 1
490 137 114 if ($id) { }
494 0 137 if $self->verbose > 1
496 5 132 if (not $raw_data) { }
506 0 132 if ($self->verbose > 1)
518 0 132 if $self->verbose > 1
524 0 132 if $self->verbose > 1
534 1 0 if ($time and $self->atime + $time < time)
546 0 132 if $self->verbose > 1
554 0 251 if $self->verbose > 1
608 5 114 $id ? :
632 242 450 if ($#arg < 0) { }
283 167 elsif ($#arg == 0) { }
649 0 167 if $key =~ /^_/
659 40 127 unless $$data{$key} or $arg{$key}
661 0 0 if (not $$data{$key} and $arg{$key} or $$data{$key} and not $arg{$key} or $$data{$key} ne $arg{$key})
683 0 251 if $self->verbose > 1
696 0 753 unless $default{$key}
709 0 753 unless (exists $options{$required})
713 0 0 if $self->verbose
718 0 753 unless $options{$required}
722 251 502 if ($required eq 'driver') { }
251 251 elsif ($required eq 'id') { }
251 0 elsif ($required eq 'serialize') { }
724 251 0 if ($driver{lc $options{$required}}) { }
735 251 0 if ($id_generator{lc $options{$required}}) { }
746 251 0 if ($serializer{lc $options{$required}}) { }
762 0 251 if ($self->verbose > 1)
790 0 40 unless (defined $q)
797 0 40 if (not $name) { }
0 40 elsif (ref $name ne 'ARRAY') { }
845 114 137 unless ($id)
852 114 0 if ($q->can('cookie')) { }
856 0 114 if $self->verbose > 1
862 0 0 if $self->verbose > 1
865 114 0 unless ($id)
881 0 251 if ($self->id_option eq 'Static' and not $self->id)
894 1 6 unless $time
896 4 2 if $time =~ /\d$/
898 0 6 unless $time =~ /^([-+]?\d+)([smhdwMy])$/