blib/lib/CLDR/Number/Format/Decimal.pm

filter: Statementstmt 100% 22 / 22 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 50.0% 1 / 2 totaltotal 96.9% 32 / 33 CC 2 SCAR 2.2
CC
2
Cov
100%
format
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« blib/lib/CLDR/Number/Format/Percent.pm ↑ Summary blib/lib/CLDR/Number.pm »
1 package CLDR::Number::Format::Decimal;
2  
3 13 ▶use v5.8.1;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 13 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 13 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 13 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 13 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 13 our $VERSION = '0.17';
11  
12 13 with qw( CLDR::Number::Role::Format );
13  
14 13 has _pattern_type => (
15 is => 'ro',
16 default => 'decimal',
17 );
18  
19 ▶sub BUILD {}
Subroutine BUILD: called CC=1 SCAR=0.0
Pod undocumented
20  
21 sub format {
22 156 ▶ my ($self, $num) = @_;
Subroutine format: called CC=2 SCAR=6.9
Pod documented
23  
24 156 $num = $self->_validate_number(format => $num);
25 156 ▶ return undef unless defined $num;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $num 1 155 156
26  
27 155 return $self->_format_number($num);
28 }
29  
30 13 1;
31  
32 __END__
« blib/lib/CLDR/Number/Format/Percent.pm ↑ Summary blib/lib/CLDR/Number.pm »