DAS/SE.pm

filter: Statementstmt 94.1% 16 / 17 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 3 totaltotal 83.3% 25 / 30 CC 3 SCAR 5.8
CC
3
Cov
90%
parse
3.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.8
« DAS/NU.pm ↑ Summary DAS/BE.pm »
1 package Net::DAS::SE;
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(se)],
9 public => {
10 host => 'free.iis.se',
11 port => 80,
12 },
13 dispatch => [ \&query, \&parse ],
14  
15 };
16 }
17  
18 4 ▶sub query {
Subroutine query: called CC=1 SCAR=0.0
Pod undocumented
19 4 my $d = shift;
20 4 return "GET /free?q=$d HTTP/1.1\n" . "host: free.iis.se\n\n";
21  
22 }
23  
24 4 ▶sub parse {
Subroutine parse: called CC=3 SCAR=11.3
Pod undocumented
25 4 chomp( my $i = uc(shift) );
26 4 chomp( my $dn = uc(shift) );
27 4 ▶ return 1 if uc($i) =~ m/FREE $dn/;
Branch: 1 branch
BranchTrueFalseTotal
if uc($i) =~ /FREE $dn/ 2 2 4
28 2 ▶ return 0 if uc($i) =~ m/OCCUPIED $dn/;
Branch: 1 branch
BranchTrueFalseTotal
if uc($i) =~ /OCCUPIED $dn/ 2 0 2
29 0 return (-100);
30 }
31  
32 2 1;
33  
34 =pod
35  
36 =head1 NAME
37  
38 Net::DAS::SE - Net::DAS .SE extension.
39  
40 See L<Net::DAS>
41  
42 =head1 AUTHOR
43  
44 Michael Holloway <michael@thedarkwinter.com>
45  
46 =head1 LICENSE
47  
48 Artistic License
49  
50 =cut
« DAS/NU.pm ↑ Summary DAS/BE.pm »