Branch Coverage

blib/lib/Speak.pm
Criterion Covered Total %
branch 26 86 30.2


line true false branch
75 7 0 $self->{'append'} ? :
81 7 0 if (open my $fh, $mode, $logfile) { }
94 0 7 unless defined $msg
98 7 0 if ($self->{'handle'})
101 7 0 $self->{'timestamped'} ? :
111 7 0 if $self->{'handle'}
119 0 1 unless -f $file
122 1 0 if (open my $fh, "<", $file)
125 0 2 if $line =~ /^\s*[#!]/ or $line =~ /^\s*$/
126 2 0 if ($line =~ /^\s*([^:=]+?)\s*[:=]\s*(.*?)\s*$/)
131 0 1 unless $ENV{$1}
151 0 8 unless defined $text
157 1 7 if (length $text > 100 and not $text =~ /[.!?;]/)
168 0 7 unless (@sentences)
185 0 0 if ($response->is_success) { }
187 0 0 if (length $content == 0)
193 0 0 if ($content =~ /^\s*<(!DOCTYPE|html)/i)
210 0 0 if (system("which ffmpeg >/dev/null 2>&1") == 0)
215 0 0 if (system("which mpg123 >/dev/null 2>&1") == 0)
220 0 0 if (system("which lame >/dev/null 2>&1") == 0)
278 7 0 unless $log
285 0 7 unless $msg
286 0 7 if ref $msg eq "GLOB"
307 1 18 if ($path and -f $path)
326 6 0 unless ($lang)
327 0 6 if ($ENV{'SPEAK_LANG'}) { }
334 0 12 if (-f $conf_file)
336 0 0 if ($conf{'language'})
351 0 6 unless $sentence =~ /\S/
354 6 0 unless $mp3_data
364 0 6 if (@mp3_files)
372 0 0 if (@mp3_files > 1) { }
386 0 0 if (-f $final_file)
387 0 0 if ($ENV{'DEBUG_SPEAK'})
396 0 0 if ($os eq 'darwin') { }
0 0 elsif ($os eq 'MSWin32' or $os eq 'cygwin') { }
409 0 0 if ($os eq "cygwin")
419 0 0 if (system(qq[sox "$final_file" "$wav_file"]) == 0) { }
421 0 0 if ($os eq "cygwin")
427 0 0 if (system($cmd_wav) != 0)
438 0 0 if (system($cmd) != 0)
449 0 0 if (-x '/usr/bin/paplay' or -x '/bin/paplay') { }
454 0 0 if (&_convert_mp3_to_wav($final_file, $wav_file)) { }