line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::DAS::LT; |
2
|
2
|
|
|
2
|
|
1718
|
use 5.010; |
|
2
|
|
|
|
|
7
|
|
3
|
2
|
|
|
2
|
|
20
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
53
|
|
4
|
2
|
|
|
2
|
|
21
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
391
|
|
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
|
|
|
|
|
12
|
return "get 1.0 " . $d; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub parse { |
23
|
4
|
|
|
4
|
0
|
9
|
chomp( my $i = uc(shift) ); |
24
|
4
|
100
|
|
|
|
20
|
return 1 if $i =~ m/.*STATUS:\sAVAILABLE/; |
25
|
2
|
50
|
|
|
|
14
|
return 0 if $i =~ m/.*STATUS:\sREGISTERED/; |
26
|
0
|
|
|
|
|
|
return (-100); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=pod |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 NAME |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
Net::DAS::LT - Net::DAS .LT extension. |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
See L |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 AUTHOR |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Michael Holloway |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 LICENSE |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Artistic License |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=cut |