Branch Coverage

blib/lib/WWW/Shorten/TinyURL.pm
Criterion Covered Total %
branch 12 32 37.5


line true false branch
14 1 2 unless my $url = shift()
18 2 0 if ($ENV{'WWW-SHORTEN-TESTING'})
19 1 1 if $url eq 'https://metacpan.org/release/WWW-Shorten'
30 0 0 unless $resp->is_success
32 0 0 if ($content =~ /Error/)
34 0 0 if ($content =~ /
0 0 elsif (length $content > 100) { }
45 0 0 if ($resp->content =~ m[(http\:\/\/tinyurl\.com\/\w+)]x)
52 1 3 unless my $url = shift()
55 1 2 unless $url =~ m[^http://]i
59 3 0 if ($ENV{'WWW-SHORTEN-TESTING'})
60 2 1 if $url eq 'http://tinyurl.com/abc12345'
71 0 0 unless ($resp->is_redirect)
73 0 0 if ($content =~ /Error/) { }
74 0 0 if ($content =~ /
0 0 elsif (length $content > 100) { }