line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::DAS::LT; |
2
|
2
|
|
|
2
|
|
1341
|
use 5.010; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
67
|
|
3
|
2
|
|
|
2
|
|
8
|
use strict; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
58
|
|
4
|
2
|
|
|
2
|
|
7
|
use warnings; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
347
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub register { |
7
|
|
|
|
|
|
|
return { |
8
|
1
|
|
|
1
|
0
|
7
|
tlds => [qw(lt)], |
9
|
|
|
|
|
|
|
public => { |
10
|
|
|
|
|
|
|
host => 'das.domreg.lt', |
11
|
|
|
|
|
|
|
port => 4343, |
12
|
|
|
|
|
|
|
}, |
13
|
|
|
|
|
|
|
dispatch => [\&query, \&parse], |
14
|
|
|
|
|
|
|
}; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub query { |
18
|
4
|
|
|
4
|
0
|
5
|
my $d = shift; |
19
|
4
|
|
|
|
|
13
|
return "get 1.0 " . $d; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub parse { |
23
|
4
|
|
|
4
|
0
|
9
|
chomp (my $i = uc(shift)); |
24
|
4
|
100
|
|
|
|
44
|
return 1 if $i =~ m/.*STATUS:\sAVAILABLE/; |
25
|
2
|
50
|
|
|
|
41
|
return 0 if $i =~ m/.*STATUS:\sREGISTERED/; |
26
|
0
|
|
|
|
|
|
return (-100) ; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
=pod |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 NAME |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Net::DAS::LT - Net::DAS .LT extension. |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
See L |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 AUTHOR |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Michael Holloway |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 LICENSE |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
Artistic License |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=cut |