Branch Coverage

blib/lib/HTML/SocialMedia.pm
Criterion Covered Total %
branch 43 124 34.6


line true false branch
68 1 3 unless defined $class
70 0 3 ref $_[0] eq 'HASH' ? :
73 3 0 unless (defined $lingua)
75 0 3 if ($params{'twitter'}) { }
87 0 3 if (@l) { }
93 0 3 if ($params{'cache'})
96 2 1 if ($params{'logger'})
100 0 0 if (not defined $lingua and scalar $args{'supported'})
171 1 1 ref $_[0] eq 'HASH' ? :
173 1 1 if (ref $_[0] eq 'HASH') { }
0 1 elsif (ref $_[0]) { }
1 0 elsif (@_ % 2 == 0) { }
181 2 0 if ($self->{'_logger'})
186 2 0 unless ($self->{'_alpha2'})
190 2 0 if ($self->{'_logger'})
191 0 2 if (defined $alpha2) { }
197 0 2 if ($alpha2)
199 0 0 if (not defined $salpha2 and defined $locale)
202 0 0 if ($salpha2) { }
0 0 elsif ($locale) { }
210 0 0 if ($self->{'_logger'})
217 2 0 unless ($alpha2)
218 2 0 if ($locale)
220 2 0 if (scalar @l and defined $l[0]->code_alpha2) { }
224 0 0 if (scalar @l and defined $l[0]->code_alpha2)
229 0 2 unless ($alpha2)
231 0 0 if ($self->{'_logger'})
236 2 0 if ($self->{'_logger'})
244 2 0 if ($params{'facebook_like_button'} or $params{'facebook_share_button'})
245 2 0 unless (defined $self->{'_country'})
254 0 2 if ($self->{'_cache'})
258 0 2 if (defined $res) { }
259 0 0 unless ($res)
273 0 2 if ($@)
274 0 0 if ($self->{'_logger'})
279 2 0 if (defined $response and $response->is_success) { }
283 0 2 if ($response->decoded_content =~ /is not a valid locale/) { }
0 2 elsif ($self->{'_cache'}) { }
286 0 0 if ($self->{'_cache'})
294 0 0 if ($self->{'_cache'})
316 0 2 if ($params{'align'}) { }
322 0 2 if ($self->{'_twitter'})
323 0 0 if ($params{'twitter_follow_button'})
325 0 0 if ($language eq 'English' or $language eq 'Unknown') { }
331 0 0 if ($params{'twitter_tweet_button'})
335 0 0 if ($params{'twitter_tweet_button'})
359 0 0 if ($self->{'_twitter_related'})
367 2 0 if ($params{'facebook_like_button'})
368 0 2 if ($params{'twitter_tweet_button'} or $params{'twitter_follow_button'})
373 2 0 unless ($self->{'info'})
382 0 2 if ($params{'google_plusone'} or $params{'linkedin_share_button'} or $params{'reddit_button'} or $params{'facebook_share_button'})
386 0 2 if ($params{'facebook_share_button'})
387 0 0 if ($params{'twitter_tweet_button'} or $params{'twitter_follow_button'})
392 0 0 unless ($self->{'info'})
401 0 0 if ($params{'google_plusone'} or $params{'linkedin_share_button'} or $params{'reddit_button'})
406 0 2 if ($params{'linkedin_share_button'})
411 0 0 if ($params{'google_plusone'} or $params{'reddit_button'})
415 0 2 if ($params{'google_plusone'})
431 0 0 if (defined $alpha2)
437 0 0 if ($self->{'_info'}) { }
452 0 0 if ($params{'reddit_button'})
456 0 2 if ($params{'reddit_button'})