line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Regexp::Common::URI::gopher; |
2
|
|
|
|
|
|
|
|
3
|
71
|
|
|
71
|
|
234
|
use Regexp::Common qw /pattern clean no_defaults/; |
|
71
|
|
|
|
|
69
|
|
|
71
|
|
|
|
|
295
|
|
4
|
71
|
|
|
71
|
|
250
|
use Regexp::Common::URI qw /register_uri/; |
|
71
|
|
|
|
|
77
|
|
|
71
|
|
|
|
|
2514
|
|
5
|
71
|
|
|
71
|
|
237
|
use Regexp::Common::URI::RFC1738 qw /$host $port $uchars/; |
|
71
|
|
|
|
|
72
|
|
|
71
|
|
|
|
|
5366
|
|
6
|
71
|
|
|
71
|
|
23239
|
use Regexp::Common::URI::RFC1808 qw /$pchars $pchar_range/; |
|
71
|
|
|
|
|
114
|
|
|
71
|
|
|
|
|
7052
|
|
7
|
|
|
|
|
|
|
|
8
|
71
|
|
|
71
|
|
294
|
use strict; |
|
71
|
|
|
|
|
69
|
|
|
71
|
|
|
|
|
1007
|
|
9
|
71
|
|
|
71
|
|
196
|
use warnings; |
|
71
|
|
|
|
|
61
|
|
|
71
|
|
|
|
|
1409
|
|
10
|
|
|
|
|
|
|
|
11
|
71
|
|
|
71
|
|
195
|
use vars qw /$VERSION/; |
|
71
|
|
|
|
|
74
|
|
|
71
|
|
|
|
|
12645
|
|
12
|
|
|
|
|
|
|
$VERSION = '2016060801'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
my $pchars_notab = "(?:(?:[$pchar_range]+|" . |
16
|
|
|
|
|
|
|
"%(?:[1-9a-fA-F][0-9a-fA-F]|0[0-8a-fA-F]))*)"; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
my $gopherplus_string = $pchars; |
19
|
|
|
|
|
|
|
my $search = $pchars; |
20
|
|
|
|
|
|
|
my $search_notab = $pchars_notab; |
21
|
|
|
|
|
|
|
my $selector = $pchars; |
22
|
|
|
|
|
|
|
my $selector_notab = $pchars_notab; |
23
|
|
|
|
|
|
|
my $gopher_type = "(?:[0-9+IgT])"; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
my $scheme = "gopher"; |
26
|
|
|
|
|
|
|
my $uri = "(?k:(?k:$scheme)://(?k:$host)(?::(?k:$port))?" . |
27
|
|
|
|
|
|
|
"/(?k:(?k:$gopher_type)(?k:$selector)))"; |
28
|
|
|
|
|
|
|
my $uri_notab = "(?k:(?k:$scheme)://(?k:$host)(?::(?k:$port))?" . |
29
|
|
|
|
|
|
|
"/(?k:(?k:$gopher_type)(?k:$selector_notab)" . |
30
|
|
|
|
|
|
|
"(?:%09(?k:$search_notab)(?:%09(?k:$gopherplus_string))?)?))"; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
register_uri $scheme => $uri; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
pattern name => [qw (URI gopher -notab=)], |
35
|
|
|
|
|
|
|
create => sub { exists $_ [1] {-notab} && |
36
|
|
|
|
|
|
|
!defined $_ [1] {-notab} ? $uri_notab : $uri}, |
37
|
|
|
|
|
|
|
; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
__END__ |