Branch Coverage

blib/lib/IRC/Utils.pm
Criterion Covered Total %
branch 81 106 76.4


line true false branch
284 0 12 unless defined $value
285 10 2 unless defined $type
288 1 11 if ($type eq 'ascii') { }
1 10 elsif ($type eq 'strict-rfc1459') { }
303 0 6 unless defined $value
304 4 2 unless defined $type
307 1 5 if ($type eq 'ascii') { }
1 4 elsif ($type eq 'strict-rfc1459') { }
322 0 1 unless defined $first and defined $second
323 1 0 if lc_irc($first, $type) eq lc_irc($second, $type)
336 0 3 if (ref $arg eq 'ARRAY') { }
0 3 elsif (ref $arg eq 'HASH') { }
3 0 elsif ($arg =~ /^[-+]/ or $count == 0) { }
347 2 4 if ($char eq '+' or $char eq '-') { }
354 4 2 if (length $$chanmodes[0] and length $$chanmodes[1] and length $statmodes and $char =~ /[$statmodes$$chanmodes[0]$$chanmodes[1]]/)
359 0 6 if (length $$chanmodes[2] and $action eq '+' and $char =~ /[$$chanmodes[2]]/)
375 0 2 unless defined $arg
380 1 1 if (not $arg =~ /!/ and $arg =~ /@/) { }
388 1 1 if defined $remainder
389 1 1 if defined $remainder
390 1 1 if defined $mask[2]
393 2 2 unless defined $mask[$i]
400 0 4 unless defined $line and length $line
404 9 15 if ($mode =~ /^(\+|-)$/ and !$action || $mode ne $action)
409 24 15 if $mode ne '+' and $mode ne '-'
417 0 3 unless defined $before
418 0 3 unless defined $after
431 0 2 unless defined $nickname and length $nickname
432 1 1 if $nickname =~ /^[A-Za-z_`\-^\|\\\{}\[\]][A-Za-z_0-9`\-^\|\\\{}\[\]]*$/
439 0 3 unless @$chantypes
441 0 3 unless defined $channel and length $channel
443 1 2 if &bytes::length($channel) > 200
444 1 1 if $channel =~ /^[$chanprefix][^ \a\0\012\015,:]+$/
451 0 2 unless defined $masks and defined $matches
452 0 2 if ref $masks ne 'ARRAY'
453 0 2 if ref $matches ne 'ARRAY'
458 1 1 if (matches_mask($mask, $match, $mapping))
469 0 4 unless defined $mask and length $mask
470 0 4 unless defined $match and length $match
477 2 2 if $match =~ /^$umask$/
483 0 2 unless defined $user
486 1 1 if wantarray
492 0 3 unless defined $string
493 2 1 if $string =~ /[\x03\x04\x1B]/
499 0 5 unless defined $string
500 2 3 if $string =~ /[\x02\x1f\x16\x1d\x11\x06]/
506 0 4 unless defined $string
518 3 1 unless has_formatting($string)
524 0 2 unless defined $string
528 1 1 unless has_color($string)
536 1 1 ref $utf8 ? :
548 2 6 if exists $seen{$seen} or exists $in_after{$seen}
556 2 10 if exists $seen{$seen} or exists $in_before{$seen}