line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::DAS::LT; |
2
|
2
|
|
|
2
|
|
1388
|
use 5.010; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
85
|
|
3
|
2
|
|
|
2
|
|
10
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
78
|
|
4
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
460
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub register { |
7
|
|
|
|
|
|
|
return { |
8
|
1
|
|
|
1
|
0
|
10
|
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
|
7
|
my $d = shift; |
19
|
4
|
|
|
|
|
18
|
return "get 1.0 " . $d; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub parse { |
23
|
4
|
|
|
4
|
0
|
13
|
chomp (my $i = uc(shift)); |
24
|
4
|
100
|
|
|
|
69
|
return 1 if $i =~ m/.*STATUS:\sAVAILABLE/; |
25
|
2
|
50
|
|
|
|
68
|
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 |