Condition Coverage

blib/lib/Net/Async/IRC.pm
Criterion Covered Total %
condition 16 31 51.6


and 3 conditions

line !l l&&!r l&&r condition
461 0 0 4 $$self{'on_login_f'} and @{$$self{'on_login_f'};}

or 2 conditions

line l !l condition
209 0 1 $args{'service'} ||= '6667'
375 1 0 defined $_ or return 1

or 3 conditions

line l !l&&r !l&&!r condition
93 0 5 0 $ENV{'LOGNAME'} || getpwuid $>
204 1 3 0 $$self{'connect_f'} ||= 'Future'->new->done($self)
234 0 1 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'}; } )
285 3 1 0 delete $args{'nick'} || $$self{'nick'}
286 2 2 0 delete $args{'user'} || $$self{'user'}
287 2 2 0 delete $args{'realname'} || $$self{'realname'}
295 3 1 0 not defined $on_login or ref $on_login eq 'CODE'
311 0 4 0 $$self{'login_f'} ||= $self->connect(%args)->then(sub { $self->send_message('CAP', undef, 'LS') if $$self{'use_caps'}; $self->send_message('PASS', undef, $pass) if defined $pass; $self->send_message('USER', undef, $user, '0', '*', $realname); $self->send_message('NICK', undef, $nick); my $f = $self->loop->new_future; push @{$$self{'on_login_f'};}, $f; $f->on_done($on_login) if $on_login; return $f; } )->on_fail(sub { undef $$self{'login_f'}; } )