Branch Coverage

blib/lib/Lingua/Translate/Google.pm
Criterion Covered Total %
branch 31 54 57.4


line true false branch
29 0 7 if $tag eq 'auto'
46 1 4 if ($param_rh)
81 0 1 unless $key
105 0 1 if (@_ % 2 == 0) { }
118 2 0 if (exists $$self{$p}) { }
131 1 0 if ($src)
133 0 1 unless I18N::LangTags::is_language_tag($src)
139 1 0 if ($dest)
141 0 1 unless I18N::LangTags::is_language_tag($dest)
153 0 3 unless UNIVERSAL::isa($self, 'Lingua::Translate::Google')
158 0 3 unless defined $$self{'dest'}
161 0 3 unless $self->available($$self{'dest'})
164 2 1 if ($$self{'src'} ne 'auto')
166 0 2 unless $self->available($$self{'src'})
170 1 2 if ($$self{'src'} eq 'auto')
174 1 0 if (defined $$r{'data'} and defined $$r{'data'}{'detections'} and defined $$r{'data'}{'detections'}[0])
180 1 0 if (defined $$detect_rh{'language'})
186 0 1 if $$self{'src'} eq 'auto'
199 3 0 if (defined $$r{'data'} and defined $$r{'data'}{'translations'} and defined $$r{'data'}{'translations'}[0]) { }
212 1 2 if (wantarray)
229 0 5 unless UNIVERSAL::isa($self, 'Lingua::Translate::Google')
232 5 0 if ($lang_inquiry)
236 0 5 unless I18N::LangTags::is_language_tag($lang_inquiry)
242 0 5 if $lang_inquiry and $lang_target eq 'auto'
250 5 0 if (defined $$r{'data'} and defined $$r{'data'}{'languages'} and defined $$r{'data'}{'languages'}[0])
259 5 4 if $lang_inquiry and $$lang_rh{'language'} eq lc $lang_inquiry
265 0 0 if wantarray