File Coverage

blib/lib/Number/Phone/NANP/CA.pm
Criterion Covered Total %
statement 10 10 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 1 1 100.0
total 15 15 100.0


line stmt bran cond sub pod time code
1             package Number::Phone::NANP::CA;
2              
3 3     3   1782 use strict;
  3         13  
  3         124  
4              
5 3     3   21 use base 'Number::Phone::NANP';
  3         6  
  3         427  
6              
7 3     3   21 use Number::Phone::Country qw(noexport);
  3         12  
  3         32  
8              
9             our $VERSION = 1.1001;
10              
11             my $cache = {};
12              
13             # NB this module doesn't register itself, the NANP module should be
14             # used and will load this one as necessary
15              
16             =head1 NAME
17              
18             Number::Phone::NANP::CA - CA-specific methods for Number::Phone
19              
20             =head1 DESCRIPTION
21              
22             This class implements CA-specific methods for Number::Phone. It is
23             a subclass of Number::Phone::NANP, which is in turn a subclass of
24             Number::Phone. Number::Phone::NANP sits in the middle because all
25             NANP countries can share some significant chunks of code. You should
26             never need to C this module directly, as C
27             will load it automatically when needed.
28              
29             =head1 SYNOPSIS
30              
31             use Number::Phone::NANP;
32            
33             my $phone_number = Number::Phone->new('+1 613 563 7242');
34             # returns a Number::Phone::NANP::CA object
35            
36             =head1 METHODS
37              
38             The following methods from Number::Phone::NANP are overridden:
39              
40             =over 4
41              
42             =item data_source
43              
44             Returns a string telling where and when the data for CA operators was last updated, looking something like:
45              
46             "CNAC at Wed Sep 30 10:37:39 2020 UTC"
47              
48             The current value of this is also documented in L.
49              
50             =item regulator
51              
52             Returns information about the national telecomms regulator.
53              
54             =cut
55              
56 1     1 1 17 sub regulator { 'CRTC, http://www.crtc.gc.ca/'; }
57              
58             =back
59              
60             =head1 BUGS/FEEDBACK
61              
62             Please report bugs at L, including, if possible, a test case.
63              
64             I welcome feedback from users.
65              
66             =head1 LICENCE
67              
68             You may use, modify and distribute this software under the same terms as
69             perl itself.
70              
71             =head1 AUTHOR
72              
73             David Cantrell Edavid@cantrell.org.ukE
74              
75             Copyright 2023
76              
77             =cut
78              
79             1;