Branch Coverage

blib/lib/WebService/MoviePosterDB.pm
Criterion Covered Total %
branch 26 44 59.0


line true false branch
90 2 3 if (!(exists $args{'api_version'} && defined $args{'api_version'}) || $args{'api_version'} == 1 and not exists $args{'api_key'}) { }
99 2 3 unless (defined $$self{'api_key'} and defined $$self{'api_secret'})
105 0 3 defined $args{'cache'} ? :
107 3 0 if ($$self{'_cache'})
155 0 5 unless $args{'type'} eq 'Movie'
159 1 4 if (exists $args{'imdb_code'}) { }
3 1 elsif (exists $args{'tconst'} or exists $args{'imdbid'}) { }
162 1 2 exists $args{'tconst'} ? :
163 0 3 unless my($id) = $tconst =~ /^tt(\d{6,7})$/
166 1 4 if (exists $args{'title'})
167 5 0 if (exists $args{'width'})
170 1 0 if (exists $_args{'title'} and $$self{'api_key'} eq 'demo' and $$self{'api_secret'} eq 'demo')
191 5 0 if ($$self{'api_key'} eq 'demo' and $$self{'api_secret'} eq 'demo') { }
195 1 4 if (exists $args{'title'})
196 4 1 if (exists $args{'imdb_code'})
209 0 5 unless my($s) = $page =~ /secret=([a-f0-9]{12})/
215 0 0 if (exists $args{'imdb_code'})
216 0 0 if (exists $args{'title'})
231 10 0 if ($$self{'_cache'})
235 0 10 unless (defined $content)
238 0 0 if ($response->code ne '200')
244 0 0 if ($$self{'_cache'})