line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
our $VERSION = '0.15'; |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
use Catmandu::Sane; |
5
|
1
|
|
|
1
|
|
393678
|
use Moo; |
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
7
|
|
6
|
1
|
|
|
1
|
|
172
|
use Data::Validate::URI; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
7
|
|
7
|
1
|
|
|
1
|
|
706
|
use LWP::Simple; |
|
1
|
|
|
|
|
36697
|
|
|
1
|
|
|
|
|
40
|
|
8
|
1
|
|
|
1
|
|
377
|
use Catmandu::Fix::Has; |
|
1
|
|
|
|
|
15068
|
|
|
1
|
|
|
|
|
6
|
|
9
|
1
|
|
|
1
|
|
282
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
10
|
|
|
|
|
|
|
has path => (fix_arg => 1); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
with 'Catmandu::Fix::Condition::SimpleAllTest'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
my ($self, $var) = @_; |
15
|
|
|
|
|
|
|
"(is_value(${var}) && Data::Validate::URI::is_web_uri(${var}) && LWP::Simple::head(${var}))"; |
16
|
0
|
|
|
0
|
0
|
|
} |
17
|
0
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 NAME |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
Catmandu::Fix::Condition::is_live_web_uri - check of a field contains an HTTP or HTTPS URI which is available online |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 SYNOPSIS |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
if is_live_web_uri(uri_field) |
25
|
|
|
|
|
|
|
... |
26
|
|
|
|
|
|
|
else |
27
|
|
|
|
|
|
|
... |
28
|
|
|
|
|
|
|
end |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 SEE ALSO |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
L<Catmandu::Fix> |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=cut |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |