line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::DAS::SE; |
2
|
2
|
|
|
2
|
|
1816
|
use 5.010; |
|
2
|
|
|
|
|
7
|
|
3
|
2
|
|
|
2
|
|
10
|
use strict; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
55
|
|
4
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
396
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub register { |
7
|
|
|
|
|
|
|
return { |
8
|
1
|
|
|
1
|
0
|
7
|
tlds => [qw(se)], |
9
|
|
|
|
|
|
|
public => { |
10
|
|
|
|
|
|
|
host => 'free.iis.se', |
11
|
|
|
|
|
|
|
port => 80, |
12
|
|
|
|
|
|
|
}, |
13
|
|
|
|
|
|
|
dispatch => [ \&query, \&parse ], |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
}; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub query { |
19
|
4
|
|
|
4
|
0
|
5
|
my $d = shift; |
20
|
4
|
|
|
|
|
14
|
return "GET /free?q=$d HTTP/1.1\n" . "host: free.iis.se\n\n"; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub parse { |
25
|
4
|
|
|
4
|
0
|
9
|
chomp( my $i = uc(shift) ); |
26
|
4
|
|
|
|
|
5
|
chomp( my $dn = uc(shift) ); |
27
|
4
|
100
|
|
|
|
37
|
return 1 if uc($i) =~ m/FREE $dn/; |
28
|
2
|
50
|
|
|
|
26
|
return 0 if uc($i) =~ m/OCCUPIED $dn/; |
29
|
0
|
|
|
|
|
|
return (-100); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=pod |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 NAME |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
Net::DAS::SE - Net::DAS .SE extension. |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
See L |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 AUTHOR |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
Michael Holloway |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 LICENSE |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Artistic License |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=cut |