Data/Sah/Compiler/human/TH/num.pm

filter: Statementstmt 100% 27 / 27 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 0.0% 0 / 2 totaltotal 94.4% 34 / 36 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Data/Sah/Compiler/human/TH/duration.pm ↑ Summary Data/Sah/Compiler/human/TH/timeofday.pm »
1 package Data::Sah::Compiler::human::TH::num;
2  
3 10 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 10 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 10 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 #use Log::Any '$log';
7  
8 10 ▶use Mo qw(build default);
Subroutine BEGIN: called CC=1 SCAR=0.0
9 10 ▶use Role::Tiny::With;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 10 extends 'Data::Sah::Compiler::human::TH';
12 10 with 'Data::Sah::Compiler::human::TH::Comparable';
13 10 with 'Data::Sah::Compiler::human::TH::Sortable';
14 10 with 'Data::Sah::Type::num';
15  
16 10 our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
17 10 our $DATE = '2024-02-16'; # DATE
18 10 our $DIST = 'Data-Sah'; # DIST
19 10 our $VERSION = '0.917'; # VERSION
20  
21 494 ▶sub name { "number" }
Subroutine name: called CC=1 SCAR=0.0
Pod undocumented
22  
23 494 ▶sub handle_type {
Subroutine handle_type: called CC=1 SCAR=0.0
Pod undocumented
24 494 my ($self, $cd) = @_;
25 494 my $c = $self->compiler;
26  
27 494 $c->add_ccl($cd, {type=>'noun', fmt => ["number", "numbers"]});
28 }
29  
30 10 1;
31 # ABSTRACT: human's type handler for type "num"
32  
33 __END__
« Data/Sah/Compiler/human/TH/duration.pm ↑ Summary Data/Sah/Compiler/human/TH/timeofday.pm »