SRS/Contact/PSTN.pm

filter: Statementstmt 100% 9 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 12 / 12 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« SRS/Contact/Address/Filter.pm ↑ Summary SRS/Date/Range.pm »
1  
2 package XML::SRS::Contact::PSTN;
3  
4 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use PRANG::Graph;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 has_attr 'cc' =>
8 is => "ro",
9 isa => "Str",
10 xml_name => "CountryCode",
11 xml_required => 0,
12 ;
13  
14 has_attr 'ndc' =>
15 is => "ro",
16 isa => "Str",
17 xml_name => "AreaCode",
18 xml_required => 0,
19 ;
20  
21 has_attr 'subscriber' =>
22 is => "ro",
23 isa => "Str",
24 xml_name => "LocalNumber",
25 xml_required => 0,
26 ;
27  
28 with 'XML::SRS::Node';
29  
30 1 ▶use Moose::Util::TypeConstraints;
Subroutine BEGIN: called CC=1 SCAR=0.0
31 coerce __PACKAGE__
32 => from "HashRef"
33 => via { __PACKAGE__->new( %$_ ); };
34  
35 # a coerce from Str will only handle strings in the format
36 # defined in the EPP specification ()
37 coerce __PACKAGE__
38 => from "Str"
39 => via { $_ =~ m/^\+(\d{1,3})\.(\d+)$/; __PACKAGE__->new(cc=>$1,ndc=>'',subscriber=>$2); };
40  
41 1;
« SRS/Contact/Address/Filter.pm ↑ Summary SRS/Date/Range.pm »