| 1 | package Net::DAS::UK; | ||||||||||
| 2 | 2 | ▶ | use 5.010; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 1 | ▶ | sub register { | ||||||||
|
Subroutine
register: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 7 | return { | ||||||||||
| 8 | 1 | tlds => [qw (uk co.uk ltd.uk me.uk net.uk org.uk plc.uk sch.uk)], | |||||||||
| 9 | public => { | ||||||||||
| 10 | host => 'dac.nic.uk', #'testbed-dac.nominet.org.uk', | ||||||||||
| 11 | port => 2043, | ||||||||||
| 12 | }, | ||||||||||
| 13 | registrar => { | ||||||||||
| 14 | host => 'dac.nic.uk', | ||||||||||
| 15 | port => 3043, | ||||||||||
| 16 | }, | ||||||||||
| 17 | delay => 3000000, | ||||||||||
| 18 | dispatch => [ undef, \&parse ], | ||||||||||
| 19 | close_cmd => '#exit', | ||||||||||
| 20 | }; | ||||||||||
| 21 | } | ||||||||||
| 22 | |||||||||||
| 23 | 7 | ▶ | sub parse { | ||||||||
|
Subroutine
parse: called CC=5 SCAR=16.2
Pod
undocumented
| |||||||||||
| 24 | 7 | chomp( my $i = uc(shift) ); | |||||||||
| 25 | 7 | ▶ | return (-2) if $i =~ m/IP ADDRESS (.*) NOT REGISTERED/; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 26 | 6 | $i =~ m/^([\w.]*),(\w)(,.*)?/; | |||||||||
| 27 | 6 | ▶ | return 1 if $2 eq 'N'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 28 | 4 | ▶ | return 0 if $2 eq 'Y'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 29 | 2 | ▶ | return -3 if $2 eq 'B'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 30 | 0 | return (-100); | |||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | 2 | 1; | |||||||||
| 34 | |||||||||||
| 35 | =pod | ||||||||||
| 36 | |||||||||||
| 37 | =head1 NAME | ||||||||||
| 38 | |||||||||||
| 39 | Net::DAS::UK - Net::DAS .UK extension. | ||||||||||
| 40 | |||||||||||
| 41 | See L<Net::DAS> | ||||||||||
| 42 | |||||||||||
| 43 | =head1 AUTHOR | ||||||||||
| 44 | |||||||||||
| 45 | Michael Holloway <michael@thedarkwinter.com> | ||||||||||
| 46 | |||||||||||
| 47 | =head1 LICENSE | ||||||||||
| 48 | |||||||||||
| 49 | Artistic License | ||||||||||
| 50 | |||||||||||
| 51 | =cut | ||||||||||