Branch Coverage

blib/lib/ThreatNet/Bot/AmmoBot.pm
Criterion Covered Total %
branch 14 60 23.3


line true false branch
79 0 1 unless $args{'Nick'}
80 0 1 unless $args{'Channel'}
81 0 1 unless $args{'Channel'} =~ /^\#\w+$/
83 0 1 unless $args{'Server'}
90 1 0 unless (_INSTANCE $args{'IRC'}, 'POE::Component::IRC')
91 0 1 unless $args{'IRC'} = 'POE::Component::IRC'->spawn
160 0 1 wantarray ? :
182 0 1 if $self->running
183 1 0 $_[0] && (-p $_[0] || -f $_[0]) && -r $_[0] ? :
185 0 1 if ($self->tails->{$file})
199 0 1 if (_INSTANCE $args{'Driver'}, 'POE::Driver') { }
0 1 elsif ($args{'Driver'}) { }
204 0 1 if (_INSTANCE $args{'Filter'}, 'POE::Filter') { }
0 1 elsif ($args{'Filter'}) { }
230 0 0 unless ($self->files)
271 0 0 unless $_[3]{'ThreatCache'} = 'ThreatNet::Filter::ThreatCache'->new
273 0 0 unless $_[3]{'Filter'} = 'ThreatNet::Filter::Chain'->new('ThreatNet::Filter::Network'->new('discard', 'rfc3330'), $_[3]{'ThreatCache'})
283 0 0 $_[3]{'Flood'} ? :
0 0 $_[3]{'ServerPassword'} ? :
300 0 0 unless $$Tails{$key} = 'POE::Wheel::FollowTail'->new(%{$$Tails{$key};})
310 0 0 if ($_[3]{'IRC'})
311 0 0 if ($_[3]{'IRC'}->connected)
332 0 0 unless my $Message = 'ThreatNet::Message::IPv4'->new($input)
362 0 0 if ($_[3]{'IRC'}) { }
375 0 0 if ($Message)
377 0 0 unless $_[3]{'Filter'}->keep($Message)
385 0 0 unless $msg =~ /^$Nick(?::|,)?\s+(\w+)\b/
387 0 0 unless lc $1 eq 'status'
411 0 0 unless $_[3]{'Filter'}->keep($Message)
417 0 0 unless $_[3]{'IRC'}