Branch Coverage

blib/lib/Sort/Maker.pm
Criterion Covered Total %
branch 131 144 90.9


line true false branch
115 10 235 unless $keys
119 1 234 if $@
125 1 233 unless $source
129 12 221 if (@closures)
145 5 228 unless $sorter
157 1 227 if (my $name = $$options{'name'})
177 243 479 if ($sort_makers{$opt})
181 1 242 if $options{'style'}
184 0 242 if @_ and $_[0] eq '1'
191 194 285 if ($is_boolean_arg{$opt})
194 0 194 if @_ and $_[0] eq '1'
199 11 274 if ($is_value_arg{$opt})
201 1 10 unless @_
208 273 1 if ($is_key_arg{$opt})
214 137 136 if (not defined $key_desc or $is_arg{$key_desc})
226 2 134 if (ref $key_desc eq 'HASH')
236 3 131 if (ref $key_desc eq 'ARRAY')
239 3 0 unless $key_desc
262 1 238 unless (@keys)
267 1 237 unless ($options{'style'})
272 2 235 unless _process_defaults(\%options, \@keys)
281 0 237 if _has_mutex_attrs($opts, 'defaults have')
287 2 267 if _has_mutex_attrs($key, 'key has')
302 267 0 unless (grep $$key{$_}, @grt_num_attrs)
307 267 0 unless (grep $$key{$_}, @grt_string_attrs)
330 136 131 unless ($extract_code)
340 90 41 unless $extractor_type
344 8 33 if ($extractor_type eq 'Regexp')
352 1 32 unless ($extractor_type eq 'CODE')
361 16 16 if ($$opts{'closure'} or $$key{'closure'})
378 0 16 unless (require B::Deparse)
390 0 16 unless ($source)
418 2017 2 if @bad_attrs <= 1
439 4 2 if ($is_boolean_attr{$attr})
441 0 4 if $attrs[0] eq '1'
446 1 1 if ($is_value_attr{$attr})
448 1 0 unless @attrs
475 8 46 if $$key{'descending'}
476 31 23 if $$key{'type'} eq 'number'
477 54 0 unless $$key{'type'} eq 'string' and $$key{'no_case'}
490 4 45 $$options{'ref_in'} ? :
491 4 45 $$options{'ref_out'} ? :
519 8 44 $$key{'descending'} ? :
535 30 22 if $$key{'type'} eq 'number'
536 52 0 unless $$key{'type'} eq 'string' and $$key{'no_case'}
550 4 43 $$options{'ref_in'} ? :
551 4 43 $$options{'ref_out'} ? :
586 8 52 if $$key{'descending'}
587 34 26 if $$key{'type'} eq 'number'
597 60 0 unless $$key{'type'} eq 'string' and $$key{'no_case'}
615 4 47 $$options{'ref_in'} ? :
616 4 47 $$options{'ref_out'} ? :
645 6 81 $$options{'ref_in'} ? :
655 46 54 $$key{'type'} eq 'number' ? :
662 1 99 unless $key_pack_format
666 16 83 if ($key_init_code)
683 80 6 unless $$options{'string_data'}
690 4 82 $$options{'ref_out'} ? :
699 6 80 $$options{'string_data'} ? :
748 12 34 if ($$key{'descending'}) { }
756 3 9 if delete $$key{'unsigned'}
757 3 9 if delete $$key{'unsigned_float'}
764 3 43 if ($$key{'unsigned'}) { }
9 34 elsif ($$key{'signed'}) { }
3 31 elsif ($$key{'unsigned_float'}) { }
826 5 49 if (my $fix_len = $$key{'fixed'}) { }
13 36 elsif ($$key{'varying'}) { }
829 3 2 if $$key{'descending'}
849 9 4 if $$key{'descending'}
861 1 35 if $$key{'descending'}
869 12 41 $$key{'descending'} ? :
875 44 9 unless $$key{'no_case'}