Branch Coverage

blib/lib/Lingua/Translate/Babelfish.pm
Criterion Covered Total %
branch 21 48 43.7


line true false branch
93 0 2 unless defined $options{'src'} and defined $options{'dest'}
96 0 2 unless is_language_tag($$self{'src'} = delete $options{'src'})
99 0 2 unless is_language_tag($$self{'dest'} = delete $options{'dest'})
134 0 4 unless UNIVERSAL::isa($self, 'Lingua::Translate::Babelfish')
153 0 4 if pos $text and pos $text < length $text
183 0 12 if ($res->is_success) { }
188 0 0 if $output =~ /^\*\*time-out\*\*|^ $/
192 0 0 if $output =~ /We were unable to process your? request within the available time/
222 0 0 unless my($translated) = $html =~ m[
)? ([^<]*)
230 0 0 if ($encoding =~ /^utf-?8$/i) { }
249 0 0 unless UNIVERSAL::isa($self, 'Lingua::Translate::Babelfish')
253 0 0 if (my $ok_langs = $Lingua::Translate::Babelfish::valid_langs{$$self{'babelfish_uri'}})
262 0 0 unless $res->is_success
276 0 0 unless (is_language_tag($src) and is_language_tag($dest))
299 12 0 if (UNIVERSAL::isa($_[0], 'Lingua::Translate::Babelfish')) { }
305 2 10 unless ($$self{'ua'})
329 2 12 if (UNIVERSAL::isa($_[0], 'Lingua::Translate::Babelfish')) { }
337 3 9 if ($option eq 'babelfish_uri') { }
0 9 elsif ($option eq 'ua') { }
3 6 elsif ($option eq 'agent') { }
3 3 elsif ($option eq 'chunk_size') { }
3 0 elsif ($option eq 'retries') { }
340 0 3 unless ($$self{'babelfish_uri'} = $value) =~ /\?(.*&)?$/
350 0 3 if $$self{'ua'}