blib/lib/Number/Phone/NANP/US.pm

filter: Statementstmt 100% 10 / 10 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod 100% 1 / 1 totaltotal 100% 14 / 14 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
regulator
1.0
CRAP 1.0
« blib/lib/Number/Phone/NANP/TT.pm ↑ Summary blib/lib/Number/Phone/NANP/VC.pm »
1 package Number::Phone::NANP::US;
2  
3 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 6 ▶use base 'Number::Phone::NANP';
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 6 our $VERSION = 1.1001;
8  
9 6 my $cache = {};
10  
11 # NB this module doesn't register itself, the NANP module should be
12 # used and will load this one as necessary
13  
14 =head1 NAME
15  
16 Number::Phone::NANP::US - US-specific methods for Number::Phone
17  
18 =head1 DESCRIPTION
19  
20 This class implements US-specific methods for Number::Phone. It is
21 a subclass of Number::Phone::NANP, which is in turn a subclass of
22 Number::Phone. Number::Phone::NANP sits in the middle because all
23 NANP countries can share some significant chunks of code. You should
24 never need to C<use> this module directly, as C<Number::Phone::NANP>
25 will load it automatically when needed.
26  
27 =head1 SYNOPSIS
28  
29 use Number::Phone::NANP;
30
31 my $phone_number = Number::Phone->new('+1 202 418 1440');
32 # returns a Number::Phone::NANP::US object
33
34 =head1 METHODS
35  
36 The following methods from Number::Phone::NANP are overridden:
37  
38 =over 4
39  
40 =item data_source
41  
42 Returns a string telling where and when the data for US operators was last updated, looking something like:
43  
44 "National Pooling Administrator at Wed Sep 30 10:37:39 2020 UTC"
45  
46 The current value of this is also documented in L<Number::Phone::Data>.
47  
48 =item regulator
49  
50 The national telecomms regulator
51  
52 =cut
53  
54 1 ▶sub regulator { return 'FCC, http://www.fcc.gov/'; }
Subroutine regulator: called CC=1 SCAR=0.0
Pod documented
55  
56 =back
57  
58 =head1 BUGS/FEEDBACK
59  
60 Please report bugs at L<https://github.com/DrHyde/perl-modules-Number-Phone/issues>, including, if possible, a test case.
61  
62 I welcome feedback from users.
63  
64 =head1 LICENCE
65  
66 You may use, modify and distribute this software under the same terms as
67 perl itself.
68  
69 =head1 AUTHOR
70  
71 David Cantrell E<lt>david@cantrell.org.ukE<gt>
72  
73 Copyright 2026
74  
75 =cut
76  
77 6 1;
« blib/lib/Number/Phone/NANP/TT.pm ↑ Summary blib/lib/Number/Phone/NANP/VC.pm »