| 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
| |||||||||||
| 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
| |||||||||||
| 16 | 4376 | ▶ | $country = 'GB' if($country eq 'UK'); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 17 | |||||||||||
| 18 | 4376 | return $class->_make_stub_object($number, $country); | |||||||||
| 19 | } | ||||||||||
| 20 | |||||||||||
| 21 | 15 | 1; | |||||||||
| 22 | __END__ | ||||||||||