File Coverage

blib/lib/Mail/Karmasphere/Parser/RBL/SimpleIP.pm
Criterion Covered Total %
statement 13 15 86.6
branch n/a
condition n/a
subroutine 5 7 71.4
pod 0 2 0.0
total 18 24 75.0


line stmt bran cond sub pod time code
1             package Mail::Karmasphere::Parser::RBL::SimpleIP;
2              
3 2     2   2543 use strict;
  2         4  
  2         82  
4 2     2   11 use warnings;
  2         3  
  2         64  
5 2     2   15 use base 'Mail::Karmasphere::Parser::RBL::Base';
  2         4  
  2         1212  
6              
7 0     0   0 sub _type { "ip4" }
8              
9 1     1   6 sub _streams { qw(ip4) }
10              
11 0     0 0 0 sub my_format { "rbl.simpleip" } # if the source table's "magic" field is rbl.simpleip, this module deals with it.
12              
13             sub tweaks {
14 9     9 0 6 my $self = shift;
15            
16             # we assume it's a url identity.
17              
18 9         15 my ($firstword) = split(' ', $_[0], 2);
19              
20 9         31 return ("ip4", 0, $firstword);
21             }
22              
23             1;