line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FormValidator::LazyWay::Rule::Net; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
381098
|
use strict; |
|
4
|
|
|
|
|
12
|
|
|
4
|
|
|
|
|
158
|
|
4
|
4
|
|
|
4
|
|
23
|
use warnings; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
105
|
|
5
|
4
|
|
|
4
|
|
4438
|
use Data::Validate::URI; |
|
4
|
|
|
|
|
346040
|
|
|
4
|
|
|
|
|
10342
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub uri { |
8
|
4
|
|
|
4
|
0
|
23581
|
my $uri = shift; |
9
|
4
|
100
|
|
|
|
444
|
return Data::Validate::URI::is_uri( $uri ) ? 1 : 0; |
10
|
|
|
|
|
|
|
} |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub url { |
13
|
3
|
|
|
3
|
0
|
15401
|
my $url = shift; |
14
|
3
|
100
|
|
|
|
58
|
return Data::Validate::URI::is_web_uri($url) ? 1 : 0; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub http { |
18
|
4
|
|
|
4
|
0
|
30467
|
my $url = shift; |
19
|
4
|
100
|
|
|
|
98
|
return Data::Validate::URI::is_http_uri($url) ? 1 : 0; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub https { |
23
|
4
|
|
|
4
|
0
|
17884
|
my $url = shift; |
24
|
4
|
100
|
|
|
|
90
|
return Data::Validate::URI::is_https_uri($url) ? 1 : 0; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub url_loose { |
28
|
0
|
|
|
0
|
0
|
|
my $url = shift; |
29
|
|
|
|
|
|
|
|
30
|
0
|
0
|
|
|
|
|
return $url =~ m{^https?://[-_.!~*'()a-zA-Z0-9;/?:\@&=+\$,%#]+$} ? 1 : 0; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub http_loose { |
34
|
0
|
|
|
0
|
0
|
|
my $url = shift; |
35
|
0
|
0
|
|
|
|
|
return $url =~ m{^http://[-_.!~*'()a-zA-Z0-9;/?:\@&=+\$,%#]+$} ? 1 : 0; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub https_loose { |
39
|
0
|
|
|
0
|
0
|
|
my $url = shift; |
40
|
0
|
0
|
|
|
|
|
return $url =~ m{^https://[-_.!~*'()a-zA-Z0-9;/?:\@&=+\$,%#]+$} ? 1 : 0; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |