Branch Coverage

blib/lib/Persistent/Base.pm
Criterion Covered Total %
branch 62 204 30.3


line true false branch
103 0 11 unless ref $this
119 0 11 unless ref $this
135 0 76 unless ref $this
156 0 0 unless @_ > 0
159 0 0 unless $class
163 0 0 if ($class =~ /Persistent::/) { }
182 0 0 unless @_ > 0
184 0 0 unless ref $this
189 0 0 if (defined $type) { }
196 0 0 if $Persistent::Base::EVAL_ERROR
218 0 0 unless @_ > 0
221 0 0 unless $class
226 0 0 if (defined $type) { }
233 0 0 if $Persistent::Base::EVAL_ERROR
249 0 0 unless @_ == 2
251 0 0 unless ref $this
255 0 0 if (defined $$this{'MetaData'}{$attribute}) { }
271 0 0 unless @_ == 2
273 0 0 unless ref $this
277 0 0 if (defined $$this{'MetaData'}{$attribute}) { }
291 0 0 unless @_ == 2
293 0 0 unless ref $this
297 0 0 if (defined $$this{'Data'}{$attribute}) { }
324 0 55 unless @_ > 3
327 0 55 unless ref $this
330 0 55 if not defined $name or $name eq ''
331 0 55 if not defined $type or $type eq ''
332 0 55 if not defined $data_type or $data_type eq ''
339 11 44 if ($type =~ /^i/i) { }
44 0 elsif ($type =~ /^p/i) { }
0 0 elsif ($type =~ /^t/i) { }
362 0 213 unless ref $this
369 213 0 if (exists $$this{'Data'}{$attribute}) { }
0 0 elsif (exists $$this{'TempData'}{$attribute}) { }
385 0 0 unless @_ == 1
387 0 0 unless ref $this
413 0 2 unless @_ > 0
415 0 2 unless ref $this
420 0 2 if (@id)
426 0 2 unless ($this->_is_valid_id($this->_prev_id))
444 0 0 unless @_ == 1
446 0 0 unless ref $this
451 0 0 if ($this->_is_valid_id($this->_prev_id)) { }
467 0 0 unless @_ > 1
469 0 0 unless ref $this
488 0 0 if ($this->restore_next)
505 0 5 unless @_ < 3
507 0 5 unless ref $this
524 0 11 unless @_ == 1
526 0 11 unless ref $this
531 9 2 if (defined $aref) { }
559 0 0 unless @_ > 0
561 0 0 unless ref $this
566 0 0 if (defined $href and ref $href eq 'HASH')
576 0 0 if (@values > 1) { }
597 0 3 unless @_ == 2
599 0 3 unless ref $this
601 3 0 if (defined $str) { }
620 0 0 unless @_ > 0
625 0 0 if @_
626 0 0 unless $$this{'Debug'}
689 0 0 unless @_ > 0
691 0 0 unless ref $this
735 0 0 unless @_ > 0
737 0 0 unless ref $this
788 0 0 unless @_ > 0
790 0 0 unless ref $this
861 0 0 unless @_ < 4
863 0 0 unless ref $this
894 0 32 unless ref $this
898 0 32 if (@id) { }
920 0 26 unless ref $this
924 21 5 if (@id) { }
947 0 17 unless ref $this
951 0 17 unless @id
953 0 17 unless defined shift @id
966 0 15 unless ref $this
970 11 4 unless @id
971 0 15 if (not $this->_is_valid_id(@id))
986 0 7 unless @_ > 0
988 0 7 unless ref $this
1004 5 2 if (not defined $query or $query =~ /^\s*$/) { }
1047 0 2 unless @_ > 0
1049 0 2 unless ref $this
1054 2 0 if (defined $order_by and not $order_by =~ /^\s*$/)
1070 0 2 unless @_ > 0
1072 0 2 unless ref $this
1078 0 2 if (not defined $order_by or $order_by =~ /^\s*$/) { }
1093 0 2 unless (defined $field_num)
1099 0 2 if (defined $order and $order =~ /DESC/i) { }
1130 0 2 unless @_ > 0
1132 0 2 unless ref $this
1152 0 55 unless @_ > 1
1154 0 55 unless ref $this
1157 0 55 if not defined $data_type or $data_type eq ''
1161 44 11 if ($data_type =~ /^varchar$/i) { }
0 11 elsif ($data_type =~ /^char$/i) { }
0 11 elsif ($data_type =~ /^string$/i) { }
11 0 elsif ($data_type =~ /^number$/i) { }
0 0 elsif ($data_type =~ /^datetime$/i) { }
1192 0 619 unless ref $this
1194 0 619 if (defined $$this{'Debug'} and $$this{'Debug'} eq 'Trace')