DAS/UK.pm

filter: Statementstmt 94.1% 16 / 17 Branchbran 87.5% 7 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 2 totaltotal 87.5% 28 / 32 CC 5 SCAR 11.8
CC
5
Cov
92%
parse
5.1
BEGIN
1.0
BEGIN
1.0
CRAP 3.3
« DAS/SI.pm ↑ Summary DAS/NO.pm »
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
BranchTrueFalseTotal
if $i =~ /IP ADDRESS (.*) NOT REGISTERED/ 1 6 7
26 6 $i =~ m/^([\w.]*),(\w)(,.*)?/;
27 6 ▶ return 1 if $2 eq 'N';
Branch: 1 branch
BranchTrueFalseTotal
if $2 eq "N" 2 4 6
28 4 ▶ return 0 if $2 eq 'Y';
Branch: 1 branch
BranchTrueFalseTotal
if $2 eq "Y" 2 2 4
29 2 ▶ return -3 if $2 eq 'B';
Branch: 1 branch
BranchTrueFalseTotal
if $2 eq "B" 2 0 2
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
« DAS/SI.pm ↑ Summary DAS/NO.pm »