Branch Coverage

lib/Asterisk/AGI.pm
Criterion Covered Total %
branch 13 192 6.7


line true false branch
60 1 0 unless ($self->_env)
72 0 1 unless $fh
76 0 7 unless length $_
77 7 0 if (/^agi_(\w+)\:\s+(.*)$/)
83 0 1 if ($self->_debug > 0)
105 0 0 if (defined $function and ref $function eq 'CODE')
113 0 0 if (defined $self->{'callback'} and ref $self->{'callback'} eq 'CODE')
125 0 0 if (defined $ret and $ret eq '-1' and not $self->_hungup)
136 0 0 unless $fh
140 0 0 unless defined $command
142 0 0 if $self->_debug > 3
152 0 1 unless $fh
155 0 1 if (not defined $response) { }
0 1 elsif ($response =~ /^agi_(\w+)\:\s+(.*)$/) { }
0 1 elsif ($readvars and $response eq '' or $response eq 'HANGUP') { }
1 0 elsif ($response) { }
159 0 0 if ($self->_debug > 0)
160 0 0 unless $self->_env
165 0 0 if $self->_debug > 0
170 0 0 if $self->_debug > 0
179 0 0 unless defined $response
183 0 0 if ($response =~ /^200/) { }
0 0 elsif ($response =~ /\(noresponse\)/) { }
184 0 0 if ($response =~ /result=(-?[\d*#]+)/)
190 0 0 defined $response ? :
0 0 if $self->_debug > 0
192 0 0 defined $response ? :
0 0 defined $result ? :
0 0 if $self->_debug > 3
200 0 0 if (defined $status) { }
210 0 0 if (defined $response) { }
220 0 0 if (defined $result) { }
230 0 0 if (defined $value) { }
240 0 1 if (defined $value) { }
256 1 1 if (%env) { }
270 0 0 unless ($ret)
350 0 0 unless defined $filename
351 0 0 unless defined $digits
352 0 0 unless defined $skipms
353 0 0 unless defined $ffchar
354 0 0 unless defined $rewchar
355 0 0 unless defined $pausechar
412 0 0 if ($self->execute("DATABASE GET $family $key"))
414 0 0 if ($tempresult =~ /\((.*)\)/)
454 0 0 unless defined $app
455 0 0 if (not defined $options) { }
0 0 elsif ($options =~ /^\".*\"$/) { }
480 0 0 unless defined $filename
501 0 0 unless defined $channel
505 0 0 if ($self->execute("GET FULL VARIABLE $variable $channel"))
507 0 0 if ($tempresult =~ /\((.*)\)/)
534 0 0 unless defined $timeout
535 0 0 unless defined $filename
537 0 0 if (ref $filename eq 'ARRAY') { }
562 0 0 if ($self->execute("GET VARIABLE $variable"))
564 0 0 if ($tempresult =~ /\((.*)\)/)
587 0 0 if ($channel) { }
633 0 0 unless defined $timeout
655 0 0 unless defined $timeout
684 0 0 unless defined $filename
685 0 0 unless defined $digits
686 0 0 if defined $offset
687 0 0 if defined $beep
688 0 0 if defined $silence
712 0 0 unless defined $digits
714 0 0 unless defined $string
755 0 0 unless defined $time
756 0 0 unless defined $digits
757 0 0 unless defined $format
758 0 0 unless defined $timezone
760 0 0 if ($type eq 'date') { }
0 0 elsif ($type eq 'time') { }
0 0 elsif ($type eq 'datetime') { }
808 0 0 unless defined $digits
810 0 0 unless defined $number
832 0 0 unless defined $digits
833 0 0 unless defined $gender
835 0 0 unless defined $number
858 0 0 unless defined $digits
860 0 0 unless defined $string
880 0 0 unless defined $image
901 0 0 unless defined $text
922 0 0 unless defined $time
941 0 0 unless defined $number
960 0 0 unless defined $context
979 0 0 unless defined $extension
1000 0 0 unless defined $mode
1001 0 0 unless defined $class
1021 0 0 unless defined $priority
1063 0 0 unless defined $filename
1065 0 0 unless defined $digits
1066 0 0 unless defined $offset
1068 0 0 if (ref $filename eq 'ARRAY') { }
1092 0 0 unless defined $mode
1111 0 0 unless $level
1133 0 0 unless defined $timeout