line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::DAS::NU; |
2
|
2
|
|
|
2
|
|
1196
|
use 5.010; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
63
|
|
3
|
2
|
|
|
2
|
|
7
|
use strict; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
51
|
|
4
|
2
|
|
|
2
|
|
6
|
use warnings; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
280
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub register { |
7
|
|
|
|
|
|
|
return { |
8
|
1
|
|
|
1
|
0
|
8
|
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
|
5
|
my $d = shift; |
20
|
4
|
|
|
|
|
13
|
return "GET /free?q=$d HTTP/1.1\n". |
21
|
|
|
|
|
|
|
"host: free.iis.nu\n\n"; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub parse { |
26
|
4
|
|
|
4
|
0
|
8
|
chomp (my $i = uc(shift)); |
27
|
4
|
|
|
|
|
3
|
chomp (my $dn = uc(shift)); |
28
|
4
|
100
|
|
|
|
36
|
return 1 if uc($i) =~ m/FREE $dn/; |
29
|
2
|
50
|
|
|
|
21
|
return 0 if uc($i) =~ m/OCCUPIED $dn/; |
30
|
0
|
|
|
|
|
|
return (-100) ; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=pod |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 NAME |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
Net::DAS::NU - Net::DAS .NU extension. |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
See L |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 AUTHOR |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Michael Holloway |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 LICENSE |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Artistic License |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=cut |