Branch Coverage

blib/lib/Facebook/OpenGraph.pm
Criterion Covered Total %
branch 83 104 79.8


line true false branch
59 3 44 $self->is_beta ? :
69 3 6 $self->is_beta ? :
79 1 3 $self->is_beta ? :
91 52 8 unless $param_ref
101 0 5 unless $signed_request
102 1 4 unless $self->secret
118 0 4 unless uc $val->{'algorithm'} eq 'HMAC-SHA256'
124 0 4 unless $sig eq $expected_sig
139 1 5 unless $self->redirect_uri and $self->app_id
144 4 1 if (my $scope_ref = ref $param_ref->{'scope'})
145 1 3 unless $scope_ref eq 'ARRAY'
199 0 2 unless $code
200 0 2 unless $self->redirect_uri
212 1 3 unless $cookie_value
225 1 2 unless $parsed_signed_request->{'code'}
241 0 3 unless $short_term_token
253 4 6 unless $self->app_id and $self->secret
270 1 5 if ($response->is_api_version_eq_or_later_than('v2.3'))
281 0 5 unless $token_ref->{'access_token'}
314 1 1 $response->is_modified ? :
348 0 13 unless $response->is_success
365 1 5 unless $self->access_token
372 3 0 if ($q->{'method'} eq 'POST' and $q->{'body'})
415 41 0 unless &blessed($uri) and $uri->isa('URI')
419 9 32 unless $param_ref
424 1 40 if ($self->use_appsecret_proof)
434 2 39 if ($self->{'use_post_method'})
445 20 21 if ($self->access_token)
453 24 17 if ($method eq 'POST') { }
454 6 18 if ($param_ref->{'source'} or $param_ref->{'file'} or $param_ref->{'upload_phase'} or $param_ref->{'captions_file'}) { }
465 3 3 if ($uri->path =~ m[\A /.+/videos \z]msx)
506 37 4 if $res->is_success
511 0 4 if ($res->req_headers)
521 0 2 unless $self->secret
522 0 2 unless $self->access_token
531 4 53 unless $path
533 5 52 if ($self->version and not $path =~ m[\A /v(?:\d+)\.(?:\d+)/ ]x)
545 1 1 unless $self->app_id
573 1 44 if (my $ids = $param_ref->{'ids'})
574 1 0 ref $ids ? :
578 5 40 if (my $perms = $param_ref->{'permissions'})
579 4 1 ref $perms ? :
585 174 6 unless my $path = $param_ref->{$file}
586 0 6 ref $path ? :
590 2 43 if (my $field_ref = $param_ref->{'fields'})
597 1 44 if ($object and ref $object eq 'HASH')
610 3 1 if (not $ref) { }
1 0 elsif ($ref eq 'ARRAY') { }
0 0 elsif ($ref eq 'HASH') { }
620 0 0 $r && $r eq 'HASH' ? :
632 0 1 unless $self->namespace
650 1 1 if (ref $settings_ref ne 'ARRAY')