Branch Coverage

blib/lib/WWW/Shorten/Bitly.pm
Criterion Covered Total %
branch 13 122 10.6


line true false branch
26 0 90 unless grep {$attr eq $_;} @{_attrs();}
27 54 36 unless @_
32 0 36 unless (defined $val)
44 90 2 if $attrs
55 0 0 unless $url and &blessed($url) and $url->isa('URI')
58 0 0 unless $res
59 0 0 unless ($res->is_success)
65 0 0 unless ($content_type and $content_type =~ m[application/json])
69 0 0 unless $json
76 0 0 if (@_ == 1 and ref $_[0]) { }
0 0 elsif (@_ == 1 and not ref $_[0]) { }
0 0 elsif (@_ % 2 == 0) { }
78 0 0 if $@
98 0 2 if $config
101 0 2 $^O eq 'MSWin32' ? :
102 0 2 if $ENV{'BITLY_TEST_CONFIG'}
105 0 2 if ($path and $path->is_file)
111 0 0 if $line =~ /^\s*[;#]/
113 0 0 unless $line and $line =~ /=/
118 0 0 unless $key and $val
119 0 0 if $key eq 'user'
120 0 0 unless grep {$key eq $_;} @{$attrs;}
131 0 90 unless defined $input and not ref $input and length $input
140 0 2 if (@_ == 1 and ref $_[0]) { }
2 0 elsif (@_ % 2 == 0) { }
142 0 0 if $@
158 0 0 if $lc_key eq 'user'
159 0 0 unless grep {$lc_key eq $_;} @{$attrs;}
169 0 0 unless $self->access_token
173 0 0 unless ($link)
192 0 0 unless $self->access_token
196 0 0 unless ($link)
209 0 0 $args->{'rollup'} ? :
217 0 0 unless $self->access_token
221 0 0 unless ($link)
232 0 0 unless $self->access_token
236 0 0 unless ($link)
256 0 0 unless $self->access_token
260 0 0 unless ($short_url)
276 0 0 unless $self->access_token
280 0 0 unless ($link)
289 0 0 $args->{'expand_user'} ? :
297 0 0 if $self->{'access_token'}
304 0 0 unless ($username and $password)
309 0 0 if ($id and $secret) { }
324 0 0 unless $res
325 0 0 unless ($res->is_success)
331 0 0 if ($content_type and $content_type =~ m[application/json])
333 0 0 unless $json
334 0 0 unless $json->{'access_token'}
343 0 0 unless $self->access_token
347 0 0 unless ($link)
362 0 0 if ($_[0] and &blessed($_[0]) and $_[0]->isa('WWW::Shorten::Bitly'))
365 0 0 unless my $url = shift()
373 0 0 if ($_[0] and &blessed($_[0]) and $_[0]->isa('WWW::Shorten::Bitly'))
376 0 0 unless my $url = shift()
379 0 0 unless ref $res->{'expand'} eq 'ARRAY'
390 0 0 unless $self->access_token
394 0 0 unless ($link)
414 0 0 unless $self->access_token
419 0 0 unless ($long_url)