Branch Coverage

blib/lib/Box/Calc.pm
Criterion Covered Total %
branch 23 36 63.8


line true false branch
168 10 18 if (ref $_[0] eq 'HASH') { }
175 3 25 if (defined $categories) { }
251 18 34 if (defined $category)
252 13 5 unless $category eq $box_type->category
255 33 0 if ($item_x <= $box_type_x and $item_y <= $box_type_y and $item_z <= $box_type_z)
259 1 15 unless (scalar @viable)
420 0 0 unless $a->z <=> $b->z or $a->x <=> $b->x
448 0 0 unless $Box::Calc::b->[0]{'z'} <=> $Box::Calc::a->[0]{'z'}
475 0 49 unless $Box::Calc::a->[0]{'z'} <=> $Box::Calc::b->[0]{'z'}
502 0 0 unless $Box::Calc::b->[0]{'A'} <=> $Box::Calc::a->[0]{'A'}
671 0 6 if (scalar @{$kind;} == 1) { }
679 6 6 if ($count == 1) { }
740 17295 0 if ($item->x > 0 and $item->y > 0) { }
742 17295 0 if ($box->x >= $item->y and $box->y >= $item->x)
748 0 17290 if ($new_count_per_layer > $original_count_per_layer or $original_x_per_layer == 0 or $original_y_per_layer == 0)
763 21 17274 unless ($box->pack_item($item))
764 9 12 if ($countdown) { }
769 0 12 if (scalar @{$self->boxes;} > $item_count)