Branch Coverage

lib/DBIx/DR/Iterator.pm
Criterion Covered Total %
branch 69 116 59.4


line true false branch
27 7 6 if ('ARRAY' eq ref $fetch) { }
6 0 elsif ('HASH' eq ref $fetch) { }
29 7 0 if ($count = @$fetch)
30 0 7 unless 'HASH' eq ref $fetch->[0] or &blessed($fetch->[0])
36 6 0 if ($count = keys %$fetch)
38 0 6 unless 'HASH' eq ref $fetch->{$k} or &blessed($fetch->{$k})
58 1 12 $opts{-'noitem_iter'} ? :
66 3 1 $value ? :
4 4 if @_ > 1
80 2 1 if $self->{'is_hash'}
88 22 21 if ($self->{'is_array'})
90 18 4 if $self->{'iterator'} < $self->{'count'}
96 3 18 unless defined $k
103 0 88 if @_ <= 1 or not defined $name
106 35 53 if ($self->{'is_array'}) { }
107 0 35 unless $name =~ /^\d+$/
109 0 35 if $name >= $self->{'count'} or $name < -$self->{'count'}
112 0 53 unless exists $self->{'fetch'}{$name}
116 28 60 unless (&blessed($item))
117 28 0 if (my $method = $self->{'item_constructor'}) { }
120 3 25 $self->{'noitem_iter'} ? :
132 0 6 if @_ <= 1 or not defined $name
135 2 4 if ($self->{'is_array'})
136 0 2 unless $name =~ /^\d+$/
137 0 2 if $name >= $self->{'count'} or $name < -$self->{'count'}
147 0 7 unless defined wantarray
149 5 2 if ($self->{'is_array'}) { }
157 0 7 if $field
166 2 3 if ('CODE' eq ref $key) { }
173 2 3 if ($self->{'is_array'}) { }
192 0 0 if ($self->{'is_array'})
193 0 0 $self->{'iterator'} == 1 ? :
203 0 0 if ($self->{'is_array'})
204 0 0 $self->{'iterator'} == $self->{'count'} ? :
215 0 0 if ($self->{'is_hash'})
216 0 0 unless @_ >= 3
217 0 0 unless defined $v
218 0 0 unless 'HASH' eq ref $v or &blessed($v)
220 0 0 unless exists $self->{'fetch'}{$k}
226 0 0 unless defined $k
227 0 0 unless 'HASH' eq ref $k or &blessed($k)
239 1 0 if &$is($item->$field, $value)
258 0 111 unless ref $self
260 1 110 unless exists $self->{$method}
262 4 106 if (@_ > 1)
265 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}) { }
276 3 1 if $is_changed
285 0 22 unless defined $object
286 0 22 unless 'HASH' eq ref $object
297 4 4 if (@_ > 1)
298 3 1 $value ? :
300 1 3 unless $self->{'is_changed'}
301 0 3 unless &Scalar::Util::blessed($self->{'iterator'})
302 0 3 unless $self->{'iterator'}->can('is_changed')
310 0 1 if ref $self and exists $self->{$method}