Branch Coverage

blib/lib/Telephony/Asterisk/AMI.pm
Criterion Covered Total %
branch 30 48 62.5


line true false branch
38 0 1 @_ == 1 ? :
49 0 2 unless defined($self->{$key} = $args->{$key})
71 0 1 unless ($self->{'socket'})
79 0 1 unless (defined $id)
86 0 1 if $self->{'Debug_FH'}
88 1 0 if ($id =~ m[^Asterisk Call Manager/(.+)]) { }
104 0 1 unless ($response->{'Response'} eq 'Success')
122 0 1 unless ($response->{'Response'} eq 'Goodbye')
128 0 1 unless ($self->{'socket'}->close)
149 0 7 unless my $id = $self->send_action(@_)
158 7 2 if ($response->{'ActionID'} eq $id or $response->{'Response'} eq 'Error')
164 0 2 if ($self->{'Event_Callback'})
174 3 4 @_ == 1 ? :
176 0 7 unless $act->{'Action'}
179 0 7 unless ($self->{'socket'})
189 1 13 if (ref $act->{$key}) { }
199 0 7 if ($self->{'Debug_FH'})
207 0 7 unless (print {$self->{'socket'};} $message)
222 0 9 unless ($socket)
237 0 60 if $debug_fh
239 9 51 unless length $line
243 0 51 unless $line =~ s/^([^:]+): //
245 45 6 if (not exists $response{$1}) { }
2 4 elsif (ref $response{$1}) { }