line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catmandu::Fix::Condition::is_https_uri; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = '0.13'; |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
352019
|
use Catmandu::Sane; |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
6
|
|
6
|
1
|
|
|
1
|
|
165
|
use Moo; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
6
|
|
7
|
1
|
|
|
1
|
|
703
|
use Data::Validate::URI; |
|
1
|
|
|
|
|
43263
|
|
|
1
|
|
|
|
|
48
|
|
8
|
1
|
|
|
1
|
|
8
|
use Catmandu::Fix::Has; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
10
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
has path => (fix_arg => 1); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
with 'Catmandu::Fix::Condition::SimpleAllTest'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub emit_test { |
15
|
5
|
|
|
5
|
0
|
29409
|
my ($self, $var) = @_; |
16
|
5
|
|
|
|
|
21
|
"(is_value(${var}) && Data::Validate::URI::is_https_uri(${var}))"; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 NAME |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
Catmandu::Fix::Condition::is_https_uri - check of a field contains an HTTPS URI |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 SYNOPSIS |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
if is_https_uri(uri_field) |
26
|
|
|
|
|
|
|
... |
27
|
|
|
|
|
|
|
else |
28
|
|
|
|
|
|
|
... |
29
|
|
|
|
|
|
|
end |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 SEE ALSO |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
L<Catmandu::Fix> |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=cut |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |