Branch Coverage

lib/DBIx/DR/Iterator.pm
Criterion Covered Total %
branch 80 124 64.5


line true false branch
27 12 10 if ('ARRAY' eq ref $fetch) { }
10 0 elsif ('HASH' eq ref $fetch) { }
29 12 0 if ($count = @$fetch)
30 0 12 unless 'HASH' eq ref $fetch->[0] or &blessed($fetch->[0])
36 10 0 if ($count = keys %$fetch)
38 0 10 unless 'HASH' eq ref $fetch->{$k} or &blessed($fetch->{$k})
62 2 20 $opts{-'noitem_iter'} ? :
69 3 1 $value ? :
4 4 if @_ > 1
83 2 1 if $self->{'is_hash'}
91 38 39 if ($self->{'is_array'})
93 30 8 if $self->{'iterator'} < $self->{'count'}
99 7 32 unless defined $k
106 0 118 if @_ <= 1 or not defined $name
109 51 67 if ($self->{'is_array'}) { }
110 0 51 unless $name =~ /^-?\d+$/
112 0 51 if $name >= $self->{'count'} or $name < -$self->{'count'}
115 0 67 unless exists $self->{'fetch'}{$name}
119 51 67 unless (&blessed($item))
120 39 12 if (my $method = $self->{'item_constructor'}) { }
123 2 37 $self->{'noitem_iter'} ? :
126 30 6 if (&blessed($item) and $self->{'keep_blessed'})
127 18 12 if ($self->{'is_array'}) { }
144 0 6 if @_ <= 1 or not defined $name
147 2 4 if ($self->{'is_array'})
148 0 2 unless $name =~ /^\d+$/
149 0 2 if $name >= $self->{'count'} or $name < -$self->{'count'}
159 0 7 unless defined wantarray
161 5 2 if ($self->{'is_array'}) { }
169 0 7 if $field
178 2 3 if ('CODE' eq ref $key) { }
185 2 3 if ($self->{'is_array'}) { }
204 0 0 if ($self->{'is_array'})
205 0 0 $self->{'iterator'} == 1 ? :
215 0 0 if ($self->{'is_array'})
216 0 0 $self->{'iterator'} == $self->{'count'} ? :
227 0 1 if ($self->{'is_hash'})
228 0 0 unless @_ >= 3
229 0 0 unless defined $v
230 0 0 unless 'HASH' eq ref $v or &blessed($v)
232 0 0 unless exists $self->{'fetch'}{$k}
238 0 1 unless defined $k
239 0 1 unless 'HASH' eq ref $k or &blessed($k)
248 0 1 if $self->{'is_hash'}
249 0 1 unless $self->{'count'}
263 1 2 if &$is($item->$field, $value)
282 0 113 unless ref $self
284 1 112 unless exists $self->{$method}
286 4 108 if (@_ > 1)
289 2 2 if (ref $value and ref $self->{$method}) { }
1 1 elsif (ref $value ne ref $self->{$method}) { }
1 0 elsif (defined $value and defined $self->{$method}) { }
0 0 elsif (defined $value xor defined $self->{$method}) { }
300 3 1 if $is_changed
309 0 22 unless defined $object
310 0 22 unless 'HASH' eq ref $object
321 4 4 if (@_ > 1)
322 3 1 $value ? :
324 1 3 unless $self->{'is_changed'}
325 0 3 unless &Scalar::Util::blessed($self->{'iterator'})
326 0 3 unless $self->{'iterator'}->can('is_changed')
334 0 1 if ref $self and exists $self->{$method}