| line |
true |
false |
branch |
|
330
|
63 |
264 |
unless (ref $_[0] and UNIVERSAL::isa($_[0], "Number::Format")) |
|
347
|
0 |
125 |
unless ref $self |
|
351
|
0 |
250 |
unless defined $$self{"${prefix}thousands_sep"} |
|
353
|
0 |
250 |
if $$self{"${prefix}thousands_sep"} =~ /\d/ |
|
355
|
0 |
250 |
if $$self{"${prefix}decimal_point"} =~ /\d/ |
|
363
|
0 |
0 |
if $$self{"${prefix}decimal_point"} eq $$self{"${prefix}thousands_sep"} and $prefix eq '' || $self->{'mon_decimal_point'} ne '' |
|
376
|
29 |
7 |
if (not defined $base or $base == 1024) { } |
|
|
2 |
5 |
elsif ($base == 1000) { } |
|
390
|
1 |
4 |
if $base ** 3 > "9.00719925474099e+15" |
|
391
|
3 |
1 |
unless $base > 0 and $base == int $base |
|
411
|
7 |
1 |
if vec $bitmask, $offset, 1 |
|
452
|
0 |
96 |
if (defined $locale_values->{$_} and $locale_values->{$_} eq -1) |
|
462
|
12 |
312 |
exists $locale_values->{$arg} && $locale_values->{$arg} ne '' ? : |
|
467
|
1216 |
40 |
unless defined $args{$_} |
|
483
|
0 |
24 |
if $$me{"${prefix}decimal_point"} eq $$me{"${prefix}thousands_sep"} |
|
486
|
0 |
12 |
if %args |
|
518
|
1 |
120 |
unless (defined $number) |
|
524
|
5 |
116 |
unless defined $precision |
|
525
|
0 |
121 |
unless defined $precision |
|
527
|
0 |
121 |
unless int $precision == $precision |
|
530
|
0 |
121 |
if (ref $number and $number->isa("Math::BigFloat")) |
|
542
|
1 |
120 |
if $product > "9.00719925474099e+15" |
|
548
|
4 |
116 |
if $sign < 0 |
|
589
|
2 |
90 |
unless (defined $number) |
|
599
|
55 |
37 |
$mon ? : |
|
602
|
8 |
84 |
unless defined $precision |
|
603
|
89 |
3 |
unless defined $trailing_zeroes |
|
607
|
5 |
87 |
if $sign < 0 |
|
612
|
0 |
91 |
if ($number =~ /^(-?[\d.]+)e([+-]\d+)$/) |
|
626
|
78 |
13 |
if length $integer < length $number |
|
628
|
13 |
78 |
unless defined $decimal |
|
631
|
55 |
36 |
if $trailing_zeroes and $precision > length $decimal |
|
636
|
91 |
0 |
if ($thousands_sep) |
|
648
|
8 |
83 |
if $integer eq "" |
|
651
|
83 |
8 |
defined $decimal && length $decimal ? : |
|
655
|
5 |
86 |
$sign < 0 ? : |
|
675
|
1 |
7 |
unless (defined $number) |
|
681
|
8 |
0 |
unless defined $format |
|
682
|
0 |
8 |
unless $format =~ /x/ |
|
725
|
1 |
12 |
unless (defined $number) |
|
731
|
0 |
13 |
unless defined $picture |
|
744
|
4 |
9 |
if $sign < 0 |
|
745
|
4 |
9 |
$sign < 0 ? : |
|
746
|
4 |
9 |
$sign < 0 ? : |
|
751
|
0 |
13 |
unless defined $pic_int |
|
752
|
3 |
10 |
unless defined $pic_dec |
|
754
|
0 |
13 |
if @cruft |
|
772
|
0 |
13 |
unless defined $num_int |
|
773
|
3 |
10 |
unless defined $num_dec |
|
776
|
2 |
11 |
if (length $num_int > $intsize) |
|
779
|
0 |
2 |
unless defined $pic_prefix |
|
793
|
8 |
3 |
if $picture =~ /\Q$self->{'decimal_point'}\E/ |
|
799
|
16 |
2 |
if $char eq "#" |
|
808
|
67 |
54 |
if $char eq "#" |
|
810
|
17 |
104 |
if not defined $char or $char eq $self->{'thousands_sep'} and $#num_int < 0 |
|
816
|
0 |
11 |
unless defined $sign_prefix |
|
817
|
3 |
8 |
unless defined $pic_prefix |
|
854
|
1 |
54 |
unless (defined $number) |
|
862
|
52 |
3 |
if not defined $curr_symbol or lc $curr_symbol eq "int_curr_symbol" |
|
864
|
3 |
52 |
if not defined $curr_symbol or lc $curr_symbol eq "currency_symbol" |
|
865
|
0 |
55 |
unless defined $curr_symbol |
|
869
|
52 |
3 |
$curr_symbol eq $self->{'int_curr_symbol'} ? : |
|
872
|
48 |
7 |
unless defined $precision |
|
873
|
0 |
55 |
unless defined $precision |
|
874
|
0 |
55 |
unless defined $precision |
|
878
|
41 |
14 |
if $sign < 0 |
|
886
|
1 |
54 |
unless $decimal |
|
891
|
41 |
14 |
if ($sign < 0) { } |
|
908
|
54 |
1 |
$precision ? : |
|
913
|
20 |
35 |
if ($sep_by_space == 0) { } |
|
|
23 |
12 |
elsif ($sep_by_space == 1) { } |
|
|
12 |
0 |
elsif ($sep_by_space == 2) { } |
|
933
|
35 |
20 |
if ($sign_posn >= 0 and $sign_posn <= 2) { } |
|
|
20 |
0 |
elsif ($sign_posn == 3 or $sign_posn == 4) { } |
|
936
|
35 |
0 |
if ($curr_symbol ne "") |
|
938
|
26 |
9 |
if ($cs_precedes) { } |
|
948
|
7 |
28 |
if ($sign_posn == 0) { } |
|
|
21 |
7 |
elsif ($sign_posn == 1) { } |
|
964
|
13 |
7 |
if ($sign_posn == 3) { } |
|
974
|
11 |
9 |
if ($cs_precedes) { } |
|
1082
|
1 |
17 |
unless (defined $number) |
|
1088
|
0 |
18 |
if $number < 0 |
|
1094
|
0 |
18 |
if (@options == 1) { } |
|
1107
|
14 |
4 |
unless defined $options{'precision'} |
|
1109
|
0 |
18 |
unless defined $options{'precision'} |
|
1113
|
6 |
12 |
if ($options{'mode'} =~ /^iec(60027)?$/i) { } |
|
|
12 |
0 |
elsif ($options{'mode'} =~ /^trad(itional)?$/i) { } |
|
1118
|
0 |
6 |
if exists $options{'base'} |
|
1140
|
16 |
2 |
unless defined $options{'unit'} |
|
1145
|
16 |
2 |
if ($unit eq "A") |
|
1147
|
2 |
14 |
if ($number >= $mult{'giga'}) { } |
|
|
6 |
8 |
elsif ($number >= $mult{'mega'}) { } |
|
|
3 |
5 |
elsif ($number >= $mult{'kilo'}) { } |
|
1168
|
2 |
16 |
if ($unit eq 'G') { } |
|
|
6 |
10 |
elsif ($unit eq 'M') { } |
|
|
5 |
5 |
elsif ($unit eq 'K') { } |
|
|
0 |
5 |
elsif ($unit ne 'N') { } |
|
1232
|
1 |
19 |
unless (defined $formatted) |
|
1239
|
2 |
18 |
unless $formatted =~ /\d/ |
|
1247
|
0 |
0 |
if ($self->{'mon_decimal_point'} and $self->{'decimal_point'} ne $self->{'mon_decimal_point'} and $self->{'decimal_point'} ne $self->{'mon_thousands_sep'} and $self->{'mon_decimal_point'} ne $self->{'thousands_sep'}) |
|
1267
|
0 |
14 |
if @cruft |
|
1271
|
1 |
13 |
$formatted =~ /^\D*-/ ? : |
|
1273
|
2 |
12 |
if $formatted =~ /\Q$before_re\E(.+)\Q$after_re\E/ |
|
1276
|
0 |
14 |
unless defined $integer |
|
1277
|
6 |
8 |
unless defined $decimal |
|
1283
|
2 |
12 |
if $sign < 0 |
|
1286
|
5 |
9 |
if $kp |
|
1287
|
1 |
13 |
if $mp |
|
1288
|
2 |
12 |
if $gp |