File Coverage

blib/lib/Number/Phone/NANP/US.pm
Criterion Covered Total %
statement 7 7 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod 1 1 100.0
total 11 11 100.0


line stmt bran cond sub pod time code
1             package Number::Phone::NANP::US;
2              
3 4     4   2555 use strict;
  4         14  
  4         151  
4              
5 4     4   22 use base 'Number::Phone::NANP';
  4         11  
  4         777  
6              
7             our $VERSION = 1.1001;
8              
9             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 this module directly, as C
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.
47              
48             =item regulator
49              
50             The national telecomms regulator
51              
52             =cut
53              
54 1     1 1 23 sub regulator { return 'FCC, http://www.fcc.gov/'; }
55              
56             =back
57              
58             =head1 BUGS/FEEDBACK
59              
60             Please report bugs at L, 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 Edavid@cantrell.org.ukE
72              
73             Copyright 2023
74              
75             =cut
76              
77             1;