blib/lib/Number/Phone/Lib.pm

filter: Statementstmt 100% 14 / 14 Branchbran 100% 6 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod 100% 1 / 1 totaltotal 100% 24 / 24 CC 4 SCAR 11.0
CC
4
Cov
100%
new
4.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« blib/lib/Number/Phone/StubCountry.pm ↑ Summary blib/lib/Number/Phone/StubCountry/CC.pm »
1 package Number::Phone::Lib;
2  
3 15 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 15 ▶use base 'Number::Phone';
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 15 our $VERSION = '1.0';
7  
8 4380 ▶sub new {
Subroutine new: called CC=4 SCAR=13.9
Pod documented
9 4380 my $class = shift;
10 4380 my($country, $number) = $class->_new_args(@_);
11 4380 ▶ return undef unless $country;
Branch: 1 branch
BranchTrueFalseTotal
unless $country 4 4376 4380
12  
13 # libphonenumber erroneously treats non-geographic numbers such
14 # as 1-800 numbers as being in the US
15 4376 ▶ $country = 'US' if($country eq 'NANP');
Branch: 1 branch
BranchTrueFalseTotal
if $country eq "NANP" 85 4291 4376
16 4376 ▶ $country = 'GB' if($country eq 'UK');
Branch: 1 branch
BranchTrueFalseTotal
if $country eq "UK" 12 4364 4376
17  
18 4376 return $class->_make_stub_object($number, $country);
19 }
20  
21 15 1;
22 __END__
« blib/lib/Number/Phone/StubCountry.pm ↑ Summary blib/lib/Number/Phone/StubCountry/CC.pm »