Branch Coverage

blib/lib/Statistics/WeightedSelection.pm
Criterion Covered Total %
branch 36 40 90.0


line true false branch
29 2 60 ref $object ? :
3 62 defined $args{'id'} ? :
31 2 63 unless ($weight and $object)
36 0 63 unless ($weight =~ /^\d+(\.\d*)?/)
73 48 15 defined $last ? :
95 1 11 unless (defined $id)
99 2 9 ref $id ? :
104 0 11 unless ($indexes and %{$indexes;})
130 1 1410008 unless @{$$self{'objects'};}
149 336219 1861071 if ($random < $$current_object{'starting_index'}) { }
451063 1410008 elsif ($random >= $$current_object{'starting_index'} + $$current_object{'weight'}) { }
164 10002 1400006 if ($self->replace_after_get) { }
173 1324070 75936 unless (keys %{$$self{'id_lookup'}{$$random_element{'id'}};})
187 1 1410010 if defined $new_setting
200 280005 1130062 unless @{$$self{'objects'};}
244 833080 0 $removed_index_index == $#removed_indexes ? :
256 1407334 73809 unless ($ids_evaluated_for_range{$$object{'id'}}++)
257 1375281 0 if $_ >= $range_start
269 519740 961403 $object_index == 0 ? :
284 15 1410056 unless @{$$self{'objects'};}