blib/lib/Lingua/ENG/Numbers.pm

filter: Statementstmt 78.1% 25 / 32 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 4 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 72.7% 8 / 11 Podpod 100% 2 / 2 totaltotal 66.0% 35 / 53 CC 4 SCAR 18.7
CC
4
Cov
66%
parse
20.0
new
2.0
BEGIN
1.0
CRAP 6.5
↑ Summary
1 # For Emacs: -*- mode:cperl; eval: (folding-mode 1) -*-
2  
3 package Lingua::ENG::Numbers;
4 # ABSTRACT: This module is deprecated. Please use Lingua::ENG::Num2Word instead.
5  
6 1 ▶use 5.16.0;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 # {{{ use block
11  
12 1 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 1 ▶use Export::Attrs;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 1 ▶use Lingua::ENG::Num2Word qw(num2eng_cardinal);
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 # }}}
17 # {{{ var block
18  
19 1 our $VERSION = '0.2603270';
20  
21 # }}}
22  
23 # {{{ re-export from Num2Word
24  
25 0 ▶sub num2eng_cardinal :Export { goto &Lingua::ENG::Num2Word::num2eng_cardinal }
Subroutine BEGIN: called CC=1 SCAR=0.2
Subroutine num2eng_cardinal: not called CC=1 SCAR=0.2
26  
27 # }}}
28 # {{{ new constructor (deprecated)
29  
30 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
Pod documented
31 0 my $class = shift;
32 0 carp "Lingua::ENG::Numbers is deprecated, use Lingua::ENG::Num2Word instead";
33 0 return Lingua::ENG::Num2Word->new(@_);
34 }
35  
36 # }}}
37 # {{{ parse delegate to Num2Word (deprecated)
38  
39 0 ▶sub parse :Export {
Subroutine parse: not called CC=4 SCAR=30.0
Pod documented
40 0 ▶ my $self = ref($_[0]) ? shift : __PACKAGE__->new();
Branch: 1 branch
BranchTrueFalseTotal
ref $_[0] ? : 0 0 0
41 0 ▶ my $number = shift // return '';
Condition0%0/2
shift() // (return "")
l!l
00
MC/DC0%0/1
shift() // (return "")
shift()
Truth table0%0/2
A
A= shift()
Aresult
11
00
42  
43 0 ▶ return num2eng_cardinal($number) // '';
Condition0%0/2
num2eng_cardinal($number) // ""
l!l
00
MC/DC0%0/1
num2eng_cardinal($number) // ""
num2eng_cardinal($number)
Truth table0%0/2
A
A= num2eng_cardinal($number)
Aresult
11
00
44 1 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
45  
46 # }}}
47  
48 1 1;
49  
50 __END__
↑ Summary