Condition Coverage

blib/lib/Net/Async/IRC.pm
Criterion Covered Total %
condition 24 48 50.0


and 3 conditions

line !l l&&!r l&&r condition
344 2 2 2 $self->{'use_caps'} and &any(sub { $_ eq "sasl"; } , @{$$self{"use_caps"};})
541 0 0 6 $self->{'on_login_f'} and @{$self->{'on_login_f'};}

or 2 conditions

line l !l condition
228 0 2 $args{'service'} ||= 6667
444 2 0 defined $_ or return 1
563 0 1 $self->{'authenticate_buffer'} // ""

or 3 conditions

line l !l&&r !l&&!r condition
103 0 9 0 $ENV{'LOGNAME'} || getpwuid $>
223 1 5 0 $self->{'connect_f'} ||= "Future"->new->done($self)
253 0 2 0 $self->{'connect_f'} ||= $self->SUPER::connect(%args, "on_resolve_error", sub { my($msg) = @_; chomp $msg; if ($args{'on_resolve_error'}) { $args{'on_resolve_error'}->($msg); } elsif ($on_error) { &$on_error("Cannot resolve - $msg"); } ; } , "on_connect_error", sub { if ($args{'on_connect_error'}) { $args{'on_connect_error'}->(@_); } elsif ($on_error) { &$on_error("Cannot connect"); } ; } )->on_fail(sub { undef $self->{'connect_f'}; } )
312 0 6 0 $self->{'login_f'} //= $self->_login(%args)->on_fail(sub { undef $self->{'login_f'}; } )
320 5 1 0 delete $args{'nick'} || $self->{'nick'}
321 4 2 0 delete $args{'user'} || $self->{'user'}
322 4 2 0 delete $args{'realname'} || $self->{'realname'}
330 5 1 0 not defined $on_login or ref $on_login eq "CODE"
428 1 0 0 $self->{'on_cap_finished_f'} //= $self->loop->new_future
446 1 1 0 $self->{'on_cap_finished_f'} //= $self->loop->new_future
582 1 0 0 $self->{'on_sasl_complete_f'} //= "Future"->new
593 0 0 0 $self->{'on_sasl_complete_f'} //= "Future"->new