Branch Coverage

blib/lib/Net/IPAddress/Filter/IPFilterDat.pm
Criterion Covered Total %
branch 9 10 90.0


line true false branch
40 1 1 if (ref $file and &Scalar::Util::reftype($file) eq 'GLOB' || &Scalar::Util::reftype(\$file) eq 'GLOB') { }
46 0 1 unless open $FH, '<', $file
52 3 2 if $self->add_rule($line)
65 5 2 if (my $data = _parse_rule($rule))
78 9 4 if ($rule =~ /\n \A \s*\n ([0-9]{1,3} \. [0-9]{1,3} \. [0-9]{1,3} \. [0-9]{1,3}) # Start IP address\n \s* - \s*\n ([0-9]{1,3} \. [0-9]{1,3} \. [0-9]{1,3} \. [0-9]{1,3}) # End IP address\n \s* , \s*\n (\d+) # Score\n \s* , \s*\n (.*?) # Label\n \s* \z\n /)