| blib/lib/Number/Bytes/Human.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| condition | 47 | 67 | 70.1 |
| line | !l | l&&!r | l&&r | condition |
|---|---|---|---|---|
| 119 | 82 | 0 | 27 | @_ == 1 and ref $_[0] |
| 200 | 105 | 0 | 1 | exists $args{'precision'} and $args{'precision'} =~ /\A\d+\z/ |
| 205 | 105 | 1 | 0 | exists $args{'precision_cutoff'} and $args{'precision_cutoff'} =~ /\A\d+\z/ || ($args{'precision_cutoff'} = '-1') |
| 231 | 58 | 1 | 11 | $bytes == 0 and defined $options{'ZERO'} |
| 283 | 0 | 27 | 33 | $options{'PRECISION_CUTOFF'} != -1 and length sprintf('%d', $bytes) > $options{'PRECISION_CUTOFF'} |
| 296 | 0 | 78 | 0 | exists $options{'ZERO'} and !(defined $options{'ZERO'} || defined $human) || defined $human && $human eq $options{'ZERO'} |
| line | l | !l | condition |
|---|---|---|---|
| 28 | 114 | 0 | shift() || 1024 |
| 166 | 1 | 1 | $args{'round_style'} || 'unknown' |
| 205 | 0 | 1 | $args{'precision_cutoff'} =~ /\A\d+\z/ || ($args{'precision_cutoff'} = '-1') |
| 273 | 2 | 57 | $options{'UNIT'} || '' |
| 345 | 2 | 60 | $options{'UNIT'} || '' |
| line | l | !l&&r | !l&&!r | condition |
|---|---|---|---|---|
| 133 | 4 | 0 | 105 | $args{'block'} or $args{'block_size'} |
| 1 | 0 | 104 | $args{'block'} or $args{'block_size'} or $args{'base'} | |
| 1 | 0 | 103 | $args{'block'} or $args{'block_size'} or $args{'base'} or $args{'bs'} | |
| 1 | 0 | 33 | $args{'block_1024'} or $args{'base_1024'} | |
| 1 | 0 | 32 | $args{'block_1024'} or $args{'base_1024'} or $args{'1024'} | |
| 1 | 0 | 30 | $args{'block_1000'} or $args{'base_1000'} | |
| 1 | 0 | 29 | $args{'block_1000'} or $args{'base_1000'} or $args{'1000'} | |
| 141 | 1 | 0 | 69 | $args{'block'} || $args{'block_size'} || $args{'base'} || $args{'bs'} |
| 142 | 42 | 7 | 26 | $block == 1000 or $block == 1024 |
| 49 | 25 | 1 | $block == 1000 or $block == 1024 or $block == 1024000 | |
| 296 | 1 | 0 | 77 | !(defined $options{'ZERO'} || defined $human) || defined $human && $human eq $options{'ZERO'} |
| 311 | 56 | 6 | 0 | not defined $options{'SI'} or $options{'SI'} == 1 |
| 387 | 0 | 1 | 0 | ref $proto || $proto |