Branch Coverage

blib/lib/Bot/BasicBot/Pluggable/Module/Karma.pm
Criterion Covered Total %
branch 46 54 85.1


line true false branch
28 0 136 unless defined $body
34 0 0 if ($mess->{'address'} and $body eq '++' || $body eq '-')
35 0 0 if $body eq '-'
45 16 242 if (my($thing, $op, $comment) = $body =~ /$regex/x)
46 8 8 $op eq '++' ? :
47 2 14 if ($1 eq $mess->{'who'} and $self->get('user_ignore_selfkarma'))
53 2 12 if (lc $thing eq lc $self->bot->nick)
54 1 1 $add ? :
64 8 112 if ($command eq 'karma') { }
107 9 elsif ($command eq 'explain' and $param) { }
66 0 8 if ($param and $param eq 'chameleon')
89 4 210 if ($num_comments == 0)
96 1 209 if ($num_reasons == 0)
100 106 103 if ($num_reasons == 1)
110 202 7 if ($self->get('user_show_givers')) { }
127 4 129 unless $self->get("karma_$thing")
138 109 353 if $reason
462 441 if ($row->{'positive'}) { }
139 315 126 if $reason
151 105 2 wantarray ? :
152 105 2 wantarray ? :
154 107 26 wantarray ? :
163 4 10 unless $self->get("karma_$thing")
167 0 14 unless defined $respond
168 14 0 $respond ? :
178 100 3 if ($self->get('user_randomize_reasons')) { }
185 102 1 if (scalar @$list > $count)