Branch Coverage

blib/lib/Array/To/Moose.pm
Criterion Covered Total %
branch 49 100 49.0


line true false branch
65 0 2 if defined $_[0] and not $_[0] =~ /^\w+$/
68 1 1 defined $_[0] ? :
73 0 2 if defined $_[0] and not $_[0] =~ /^\w+$/
76 1 1 defined $_[0] ? :
84 0 0 defined $_[0] ? :
90 0 0 defined $_[0] ? :
105 0 46 unless ref $data->[0]
108 0 46 unless keys %$desc
119 12 34 if (exists $desc->{$KEY})
180 0 33 unless my $type = $class->meta->find_attribute_by_name($attr_name)->type_constraint
200 0 101 if $@
203 28 73 if (defined $keycol) { }
208 0 28 if exists $result->{$key_name} and $throw_nonunique_keys
245 0 46 unless @_ == 2
248 0 46 unless my $class = $desc->{$CLASS}
256 0 46 if $@
268 122 60 unless (ref $value or $name eq $CLASS)
272 0 122 unless $value =~ /^\d+$/
275 0 122 if $value > $ncols - 1
280 58 124 if ($name eq $CLASS or $name eq $KEY)
281 0 58 if $meta->find_attribute_by_name($name)
287 0 124 unless $meta->find_attribute_by_name($name)
290 14 110 if ((my $ref = ref $value) eq 'HASH') { }
0 110 elsif ($ref eq 'ARRAY') { }
0 110 elsif ($ref) { }
299 0 0 unless @$value == 1
306 0 0 unless $value->[0] =~ /^\d+$/
309 0 0 if $value->[0] > $ncols - 1
325 0 46 if $ref_attrib
329 46 0 if $attrib
332 0 46 unless $attrib and %$attrib
364 0 33 unless @_ == 4
369 9 24 if ($type =~ /^HashRef\[([^]]*)\]/) { }
18 6 elsif ($type =~ /^ArrayRef\[([^]]*)\]/) { }
374 0 9 if ref $sub_obj ne 'HASH'
385 0 9 if ref((values %{$sub_obj;})[0]) ne $1
389 0 18 if ref $sub_obj ne 'ARRAY'
394 0 18 if ref $sub_obj->[0] ne $1
406 0 6 unless ref $sub_obj eq 'ARRAY'
413 0 6 if @$sub_obj != 1 and $throw_multiple_rows
422 0 6 unless ref $sub_obj eq $type
482 0 0 unless my $meta = $class->meta
488 0 0 unless my $constraint = $meta->find_attribute_by_name($attrib)->type_constraint
493 0 0 if ($constraint =~ /^ArrayRef\[([^]]*)\]/)
496 0 0 unless $simple_types{$1}
523 0 46 unless my $meta = $class->meta
529 0 110 unless my $constraint = $meta->find_attribute_by_name($attrib)->type_constraint
536 0 110 if $1
540 110 0 if $simple_types{$constraint}
545 0 0 if $constraint =~ /^ArrayRef/