Condition Coverage

blib/lib/Net/Async/Slack.pm
Criterion Covered Total %
condition 0 43 0.0


and 3 conditions

line !l l&&!r l&&r condition
216 0 0 0 length($args{'filename'} // "") and defined $args{'content'}
518 0 0 0 $found and $offset

or 2 conditions

line l !l condition
157 0 0 $args{'channel'} || die('need a channel')
216 0 0 $args{'filename'} // ""
218 0 0 $args{'channel'} || die('need a channel')
254 0 0 $args{'channel'} || die('need a channel')
498 0 0 $src //= ""
502 0 0 $src // "unknown"
574 0 0 $src //= ""
578 0 0 $src // "unknown"

or 3 conditions

line l !l&&r !l&&!r condition
99 0 0 0 $self->{'rtm'} //= $self->http_get("uri", $self->endpoint("rtm_connect"))->then(sub { my $result = shift(); return "Future"->done("URI"->new($result->{'url'})) if exists $result->{'url'}; return "Future"->fail("invalid URL"); } )->then(sub { my($uri) = @_; $self->add_child(my $rtm = "Net::Async::Slack::RTM"->new("slack", $self, "wss_uri", $uri)); $rtm->connect->transform("done", sub { $rtm; } ); } )
154 0 0 0 $args{'text'} or $args{'attachments'}
365 0 0 0 $self->{'endpoints'} ||= do { my $path = Path::Tiny::path(&__DIR__())->parent(3)->child("share/endpoints.json"); $path = Path::Tiny::path(File::ShareDir::dist_file("Net-Async-Slack", "endpoints.json")) unless $path->exists; $Net::Async::Slack::log->tracef("Loading endpoints from %s", $path); decode_json_text($path->slurp_utf8) }
396 0 0 0 $self->{'oauth'} //= "Net::Async::OAuth::Client"->new("realm", "Slack", "consumer_key", $self->key, "consumer_secret", $self->secret, "token", $self->token, "token_secret", $self->token_secret)
451 0 0 0 $self->{'http'} ||= do { require Net::Async::HTTP; $self->add_child(my $ua = "Net::Async::HTTP"->new("fail_on_error", 1, "close_after_request", 0, "max_connections_per_host", 4, "pipeline", 1, "max_in_flight", 8, "decode_content", 1, "timeout", 30, "user_agent", "Mozilla/4.0 (perl; https://metacpan.org/pod/Net::Async::Slack; TEAM\@cpan.org)")); $ua }
481 0 0 0 $args{'headers'} ||= $self->auth_headers
552 0 0 0 $args{'headers'} ||= $self->auth_headers