Branch Coverage

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


line true false branch
203 2 51 unless length $line
232 27 24 defined $prefix_nick ? :
242 48 3 if (my $named_args = $message->named_args)
246 2 49 if (defined $hints->{'text'} and my $encoder = $self->encoder)
250 28 23 if (defined(my $target_name = $hints->{'target_name'}))
256 12 39 if $self->can($prepare_method)
258 350 58 unless /_nick$/u
260 24 113 unless defined $name
261 51 62 if $k eq 'prefix_name'
267 17 34 if (my $disp = $message->gate_disposition)
272 1 0 $hints->{'prefix_is_me'} ? :
1 0 $type eq '*' ? :
1 1 $type eq '!' ? :
5 2 $type eq '+' ? :
10 7 $type eq '-' ? :
275 17 0 if (defined $effect)
276 0 17 if $self->invoke("on_message_gate_${effect}_$gate", $message, $hints)
277 0 17 if $self->invoke("on_message_gate_$effect", $gate, $message, $hints)
278 17 0 if $self->invoke('on_message_gate', $effect, $gate, $message, $hints)
282 9 42 if $self->invoke("on_message_$command", $message, $hints)
283 28 23 if $self->invoke('on_message', $command, $message, $hints)
285 2 49 if (not $hints->{'handled'} and $message->command ne $command)
287 0 2 if $self->invoke("on_message_$numeric", $message, $hints)
288 0 2 if $self->invoke('on_message', $numeric, $message, $hints)
339 1 13 if (@_ == 1) { }
341 0 1 unless &blessed($message) and $message->isa('Protocol::IRC::Message')
346 0 13 if ref $command
349 8 5 if (@_ == 1 and ref $_[0]) { }
352 3 5 if defined $args{'target'}
354 0 8 if (defined $args{'text'} and my $encoder = $self->encoder)
363 1 4 if (my $encoder = $self->encoder)
366 1 0 if (defined(my $i = $argnames->{'text'}))
367 1 0 if defined $args[$i]
436 24 272 unless defined $nick
441 269 3 if $mapping ne 'ascii'
445 270 2 unless $mapping eq 'strict-rfc1459'
465 0 4 unless defined $lhs and defined $rhs
468 0 4 if $lhs eq '' and $rhs eq ''
469 0 4 if $rhs eq ''
470 0 4 if $lhs eq ''
474 0 4 unless (my $lhs_index = index($PREFIX_FLAGS, $lhs)) > -1
475 1 3 unless (my $rhs_index = index($PREFIX_FLAGS, $rhs)) > -1
495 0 4 unless defined $lhs and defined $rhs
499 0 4 unless (my $lhs_index = index($PREFIX_MODES, $lhs)) > -1
500 1 3 unless (my $rhs_index = index($PREFIX_MODES, $rhs)) > -1
554 29 11 if $name =~ $self->isupport('channame_re')
691 5 5 if ($type eq 'channel') { }
5 0 elsif ($type eq 'user') { }
703 2 8 if ($text =~ /^\x01(.*)\x01$/u) { }
708 1 1 $is_notice ? :
710 0 2 if $self->invoke("on_message_${ctcptype}_$verb", $message, \%hints)
711 0 2 if $self->invoke("on_message_$ctcptype", $verb, $message, \%hints)
712 2 0 if $self->invoke('on_message', "$ctcptype $verb", $message, \%hints)
717 1 7 if $self->invoke('on_message_text', $message, \%hints)
718 4 4 if $self->invoke('on_message', 'text', $message, \%hints)
774 111 103 unless $self->can($name)