line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::Widget::Constraint::HTTP; |
2
|
|
|
|
|
|
|
|
3
|
88
|
|
|
88
|
|
90096
|
use warnings; |
|
88
|
|
|
|
|
213
|
|
|
88
|
|
|
|
|
2903
|
|
4
|
88
|
|
|
88
|
|
625
|
use strict; |
|
88
|
|
|
|
|
168
|
|
|
88
|
|
|
|
|
2756
|
|
5
|
88
|
|
|
88
|
|
474
|
use base 'HTML::Widget::Constraint::Regex'; |
|
88
|
|
|
|
|
163
|
|
|
88
|
|
|
|
|
17842
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 NAME |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
HTML::Widget::Constraint::HTTP - HTTP Constraint |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 SYNOPSIS |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
my $c = $widget->constraint( 'HTTP', 'foo' ); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 DESCRIPTION |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
HTTP URL Constraint. |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 METHODS |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head2 regex |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
Provides a regex to validate a HTTP/HTTPS URI. |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=cut |
26
|
|
|
|
|
|
|
|
27
|
7
|
|
|
7
|
1
|
37
|
sub regex {qr/^s?https?:\/\/[-_.!~*'()a-zA-Z0-9;\/?:\@&=+\$,%#]+$/} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 AUTHOR |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Sebastian Riedel, C |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 LICENSE |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
This library is free software, you can redistribute it and/or modify it under |
36
|
|
|
|
|
|
|
the same terms as Perl itself. |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=cut |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |