Branch Coverage

blib/lib/WWW/Shorten/Googl.pm
Criterion Covered Total %
branch 3 30 10.0


line true false branch
25 6 0 unless my $url = shift()
29 0 0 if (my $res = _req($request))
30 0 0 if $res->{'id'}
37 6 0 unless my $url = shift()
38 0 0 unless $url =~ m[^http://]i
44 0 0 if (my $res = _req($request))
45 0 0 if $res->{'longUrl'}
52 6 0 unless my $url = shift()
53 0 0 unless $url =~ m[^http://]i
59 0 0 if (my $res = _req($request))
65 0 0 unless $ENV{'GOOGLE_API_KEY'}
68 0 0 unless my $request = shift()
74 0 0 if (my $res = $ua->request($request)) { }
75 0 0 if ($res->is_success) { }
76 0 0 unless my $data = &JSON::MaybeXS::decode_json(scalar $res->content)