line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Phone::Valid::International::Loose; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
117428
|
use 5.006; |
|
2
|
|
|
|
|
14
|
|
4
|
2
|
|
|
2
|
|
10
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
45
|
|
5
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
93
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
8
|
|
|
|
|
|
|
|
9
|
2
|
|
|
2
|
|
11
|
use base 'Import::Export'; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
887
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our %EX = ( |
12
|
|
|
|
|
|
|
valid_phone => [qw/all/] |
13
|
|
|
|
|
|
|
); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
our $REGEX; |
16
|
|
|
|
|
|
|
BEGIN { |
17
|
2
|
|
|
2
|
|
30488
|
$REGEX = qr/\+(9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)\d{1,14}$/; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub new { |
21
|
1
|
|
|
1
|
0
|
230
|
my ($self, $args) = @_; |
22
|
1
|
|
50
|
|
|
10
|
$args ||= {}; |
23
|
1
|
|
|
|
|
3
|
bless $args, $self; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
15
|
|
|
15
|
1
|
3210
|
sub valid { goto &valid_phone; } |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub valid_phone { |
29
|
30
|
100
|
|
30
|
1
|
3644
|
my $num = $_[1] ? $_[1] : $_[0]; |
30
|
30
|
|
|
|
|
195
|
$num =~ $REGEX; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__END__ |