Branch Coverage

blib/lib/Protocol/IRC.pm
Criterion Covered Total %
branch 88 112 78.5


line true false branch
205 2 51 unless length $line
234 27 24 defined $prefix_nick ? :
244 48 3 if (my $named_args = $message->named_args)
248 2 49 if (defined $hints->{'text'} and my $encoder = $self->encoder)
252 28 23 if (defined(my $target_name = $hints->{'target_name'}))
258 12 39 if $self->can($prepare_method)
260 350 58 unless /_nick$/
262 24 113 unless defined $name
263 51 62 if $k eq 'prefix_name'
269 17 34 if (my $disp = $message->gate_disposition)
274 1 0 $hints->{'prefix_is_me'} ? :
1 0 $type eq '*' ? :
1 1 $type eq '!' ? :
5 2 $type eq '+' ? :
10 7 $type eq '-' ? :
277 17 0 if (defined $effect)
278 0 17 if $self->invoke("on_message_gate_${effect}_$gate", $message, $hints)
279 0 17 if $self->invoke("on_message_gate_$effect", $gate, $message, $hints)
280 17 0 if $self->invoke('on_message_gate', $effect, $gate, $message, $hints)
284 9 42 if $self->invoke("on_message_$command", $message, $hints)
285 28 23 if $self->invoke('on_message', $command, $message, $hints)
287 2 49 if (not $hints->{'handled'} and $message->command ne $command)
289 0 2 if $self->invoke("on_message_$numeric", $message, $hints)
290 0 2 if $self->invoke('on_message', $numeric, $message, $hints)
341 1 13 if (@_ == 1) { }
343 0 1 unless &blessed($message) and $message->isa('Protocol::IRC::Message')
348 0 13 if ref $command
351 8 5 if (@_ == 1 and ref $_[0]) { }
354 3 5 if defined $args{'target'}
356 0 8 if (defined $args{'text'} and my $encoder = $self->encoder)
365 1 4 if (my $encoder = $self->encoder)
368 1 0 if (defined(my $i = $argnames->{'text'}))
369 1 0 if defined $args[$i]
438 24 272 unless defined $nick
443 269 3 if $mapping ne 'ascii'
447 270 2 unless $mapping eq 'strict-rfc1459'
467 0 4 unless defined $lhs and defined $rhs
470 0 4 if $lhs eq '' and $rhs eq ''
471 0 4 if $rhs eq ''
472 0 4 if $lhs eq ''
476 0 4 unless (my $lhs_index = index($PREFIX_FLAGS, $lhs)) > -1
477 1 3 unless (my $rhs_index = index($PREFIX_FLAGS, $rhs)) > -1
497 0 4 unless defined $lhs and defined $rhs
501 0 4 unless (my $lhs_index = index($PREFIX_MODES, $lhs)) > -1
502 1 3 unless (my $rhs_index = index($PREFIX_MODES, $rhs)) > -1
556 29 11 if $name =~ $self->isupport('channame_re')
693 5 5 if ($type eq 'channel') { }
5 0 elsif ($type eq 'user') { }
705 2 8 if ($text =~ /^\x01(.*)\x01$/) { }
710 1 1 $is_notice ? :
712 0 2 if $self->invoke("on_message_${ctcptype}_$verb", $message, \%hints)
713 0 2 if $self->invoke("on_message_$ctcptype", $verb, $message, \%hints)
714 2 0 if $self->invoke('on_message', "$ctcptype $verb", $message, \%hints)
719 1 7 if $self->invoke('on_message_text', $message, \%hints)
720 4 4 if $self->invoke('on_message', 'text', $message, \%hints)
776 111 103 unless $self->can($name)