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