line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::DAS::NU; |
2
|
2
|
|
|
2
|
|
1245
|
use 5.010; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
73
|
|
3
|
2
|
|
|
2
|
|
7
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
62
|
|
4
|
2
|
|
|
2
|
|
7
|
use warnings; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
350
|
|
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
|
6
|
my $d = shift; |
20
|
4
|
|
|
|
|
18
|
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
|
9
|
chomp (my $i = uc(shift)); |
27
|
4
|
|
|
|
|
6
|
chomp (my $dn = uc(shift)); |
28
|
4
|
100
|
|
|
|
50
|
return 1 if uc($i) =~ m/FREE $dn/; |
29
|
2
|
50
|
|
|
|
38
|
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 |