Branch Coverage

blib/lib/Sirc/Util.pm
Criterion Covered Total %
branch 17 128 13.2


line true false branch
73 1 0 unless $main::version or $main::version
90 1 0 unless defined $main::add_ons and $main::add_ons =~ /\blibsirc\b/
95 0 1 if 'Locker: ' =~ /: \S/
160 0 6 if $Sirc::Util::Debug
186 0 0 unless defined $fn
202 0 1 unless (@_ == 1)
217 0 0 unless (@_ == 1)
256 0 6 unless @_ == 1
282 0 1 unless @_ == 2 or @_ == 3
284 0 1 @_ == 1 ? :
287 0 1 if ($cmd =~ /^set (.*)/) { }
300 0 1 if (@main::help and not $$rseen{$seen_tag}++)
312 0 0 if ($state == 0) { }
0 0 elsif ($state == 1) { }
0 0 elsif ($state == 2) { }
313 0 0 if $_ eq $targ
316 0 0 if ($_ eq $intro) { }
0 0 elsif (/^@/) { }
328 0 0 if (/^@/) { }
337 0 0 if (defined $first)
344 0 0 if length $_ > $l
351 0 0 if (length($out[$#out]) + length($this) > $w)
356 0 0 if ($out[$#out] eq '')
389 0 0 unless (@_ == 3)
398 0 0 if ($h =~ /^(\d+\.\d+\.\d+)\.\d+$/) { }
0 0 elsif ($h =~ /^[^.]+\.(.+\..+)$/) { }
0 0 elsif ($h =~ /^[^.]+\.[^.]+$/) { }
422 0 0 unless (@_ == 0 or @_ == 3)
426 0 0 @_ ? :
428 0 0 $u eq '' ? :
444 0 0 unless (@_ >= 1)
452 0 0 ref $code ? :
466 0 0 unless (@_ >= 2)
473 0 0 if ($@)
489 0 0 unless (@_ == 1)
495 0 0 unless ($main::haveops{lc $c})
511 0 0 unless (@_ == 1)
527 0 0 unless (@_ == 2)
545 0 6 unless (@_ == 1)
576 0 0 unless (@_ == 0)
582 0 0 unless ($main::args =~ /^[\#&]/)
583 0 0 unless ($main::talkchannel)
599 0 0 unless (@_ == 0)
606 0 0 unless grep {$_ == $n;} @main::trefs
618 0 0 unless (@_ == 1)
638 0 0 unless (@_ == 1)
661 0 0 if (@arg > 1 and ref $arg[1])
763 0 0 if ($lval eq 'on') { }
0 0 elsif ($lval eq 'off') { }
0 0 elsif ($lval eq 'toggle') { }
0 0 elsif ($lval eq 'nil') { }
779 0 0 if ($rvalidate and not &$rvalidate($name, $new))
784 0 0 $$rvar ? :
787 4 5 $$rvar ? :
807 0 0 if (not defined $val) { }
0 0 elsif (not $val =~ /^-?\d+$/ or $rvalidate and not &$rvalidate($name, $val)) { }
839 0 0 if (not defined $val) { }
0 0 elsif ($rvalidate and not &$rvalidate($name, $val)) { }
911 0 6 unless (@_ == 1)
917 0 6 if (exists $Sirc::Util::Hook{$hook})
934 0 4 unless (@_ == 2)
940 0 4 unless (exists $Sirc::Util::Hook{$hook})
954 0 0 unless (@_ >= 1)
960 0 0 unless (exists $Sirc::Util::Hook{$hook})