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
479 0 0 4 $self->{'on_login_f'} and @{$self->{'on_login_f'};}

or 2 conditions

line l !l condition
219 0 2 $args{'service'} ||= '6667'
389 1 0 defined $_ or return 1

or 3 conditions

line l !l&&r !l&&!r condition
98 0 7 0 $ENV{'LOGNAME'} || getpwuid $>
214 1 3 0 $self->{'connect_f'} ||= 'Future'->new->done($self)
244 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'}; } )
297 3 0 1 delete $args{'nick'} || $self->{'nick'}
298 2 0 2 delete $args{'user'} || $self->{'user'}
299 2 0 2 delete $args{'realname'} || $self->{'realname'}
307 3 1 0 not defined $on_login or ref $on_login eq 'CODE'
323 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'}; } )