Branch Coverage

blib/lib/Mojo/RabbitMQ/Client.pm
Criterion Covered Total %
branch 22 90 24.4


line true false branch
68 0 0 if (defined $err)
83 1 1 if ref $class
90 1 1 if ref $class
97 0 6 unless defined $self->params
106 0 0 if ($id and $self->channels->{$id})
111 0 0 if ($self->max_channels > 0 and scalar keys %{$self->channels;} >= $self->max_channels)
117 0 0 unless ($id)
119 0 0 if defined $self->channels->{$candidate_id}
123 0 0 unless ($id)
153 0 0 unless $self->is_open
195 2 18 unless defined $self->url
197 18 0 unless &blessed(scalar $self->url) and $self->url->isa('Mojo::URL')
212 2 16 if $self->url->scheme =~ /^(amqp|rabbitmq)s$/
215 2 16 if $defaults{'tls'}
218 7 11 if defined $self->url->host and $self->url->host ne ''
220 4 14 if defined $self->url->port
224 5 13 if (defined $userinfo)
232 9 9 if defined $vhost and $vhost ne ''
291 0 0 if ($frame->isa('Net::AMQP::Frame::Heartbeat')) { }
0 0 elsif ($frame->isa('Net::AMQP::Frame::Method') and $frame->method_frame->isa('Net::AMQP::Protocol::Connection::Close')) { }
0 0 elsif ($frame->channel == 0) { }
308 0 0 if (defined $channel) { }
337 0 0 if defined $verify
347 0 0 unless $self
348 0 0 if $err
354 0 0 if $self
355 0 0 if $self
356 0 0 if $self
373 0 0 unless ($loaded)
390 0 0 if &none(sub { $_ eq 'AMQPLAIN'; } , @mechanisms)
394 0 0 if &none(sub { $_ eq 'en_US'; } , @locales)
452 0 0 unless time - $self->heartbeat_sent > $heartbeat / 2
456 0 0 if $heartbeat
466 0 0 if defined $cb
471 0 0 if defined $cb
503 0 0 ref $exp eq 'ARRAY' ? :
508 0 0 if (not $channel_id) { }
513 0 0 if (defined $channel) { }
522 0 0 unless $queue
528 0 0 unless $frame->isa('Net::AMQP::Frame::Method')
533 0 0 if $method_frame->isa('Net::AMQP::Protocol::' . $exp)
550 0 0 if ($out->isa('Net::AMQP::Protocol::Base'))
567 0 0 if defined $self->_loop->stream($id)
573 0 20 unless my $ioloop = $self->ioloop
576 0 20 if $heartbeat_tid