| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package Net::DAS::UK; | 
| 2 | 2 |  |  | 2 |  | 2015 | use 5.010; | 
|  | 2 |  |  |  |  | 8 |  | 
| 3 | 2 |  |  | 2 |  | 13 | use strict; | 
|  | 2 |  |  |  |  | 3 |  | 
|  | 2 |  |  |  |  | 63 |  | 
| 4 | 2 |  |  | 2 |  | 10 | use warnings; | 
|  | 2 |  |  |  |  | 3 |  | 
|  | 2 |  |  |  |  | 2040 |  | 
| 5 |  |  |  |  |  |  |  | 
| 6 |  |  |  |  |  |  | sub register { | 
| 7 |  |  |  |  |  |  | return { | 
| 8 | 1 |  |  | 1 | 0 | 16 | 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 |  |  |  |  |  |  | sub parse { | 
| 24 | 7 |  |  | 7 | 0 | 14 | chomp( my $i = uc(shift) ); | 
| 25 | 7 | 100 |  |  |  | 24 | return (-2) if $i =~ m/IP ADDRESS (.*) NOT REGISTERED/; | 
| 26 | 6 |  |  |  |  | 27 | $i =~ m/^([\w.]*),(\w)(,.*)?/; | 
| 27 | 6 | 100 |  |  |  | 24 | return 1  if $2 eq 'N'; | 
| 28 | 4 | 100 |  |  |  | 15 | return 0  if $2 eq 'Y'; | 
| 29 | 2 | 50 |  |  |  | 10 | return -3 if $2 eq 'B'; | 
| 30 | 0 |  |  |  |  |  | return (-100); | 
| 31 |  |  |  |  |  |  | } | 
| 32 |  |  |  |  |  |  |  | 
| 33 |  |  |  |  |  |  | 1; | 
| 34 |  |  |  |  |  |  |  | 
| 35 |  |  |  |  |  |  | =pod | 
| 36 |  |  |  |  |  |  |  | 
| 37 |  |  |  |  |  |  | =head1 NAME | 
| 38 |  |  |  |  |  |  |  | 
| 39 |  |  |  |  |  |  | Net::DAS::UK - Net::DAS .UK extension. | 
| 40 |  |  |  |  |  |  |  | 
| 41 |  |  |  |  |  |  | See L | 
| 42 |  |  |  |  |  |  |  | 
| 43 |  |  |  |  |  |  | =head1 AUTHOR | 
| 44 |  |  |  |  |  |  |  | 
| 45 |  |  |  |  |  |  | Michael Holloway | 
| 46 |  |  |  |  |  |  |  | 
| 47 |  |  |  |  |  |  | =head1 LICENSE | 
| 48 |  |  |  |  |  |  |  | 
| 49 |  |  |  |  |  |  | Artistic License | 
| 50 |  |  |  |  |  |  |  | 
| 51 |  |  |  |  |  |  | =cut |