Branch Coverage

blib/lib/Facebook/OpenGraph.pm
Criterion Covered Total %
branch 86 108 79.6


line true false branch
59 3 41 $self->is_beta ? :
69 3 4 $self->is_beta ? :
79 1 3 $self->is_beta ? :
91 47 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 38 0 unless &blessed($uri) and $uri->isa('URI')
419 9 29 unless $param_ref
424 1 37 if ($self->use_appsecret_proof)
434 2 36 if ($self->{'use_post_method'})
445 17 21 if ($self->access_token)
453 21 17 if ($method eq 'POST') { }
454 3 18 if ($param_ref->{'source'} or $param_ref->{'file'}) { }
462 1 2 if ($uri->path =~ m[\A /.+/videos \z]msx)
503 34 4 if $res->is_success
508 0 4 if ($res->req_headers)
518 0 2 unless $self->secret
519 0 2 unless $self->access_token
528 4 50 unless $path
530 5 49 if ($self->version and not $path =~ m[\A /v(?:\d+)\.(?:\d+)/ ]x)
542 1 1 unless $self->app_id
570 1 41 if (my $ids = $param_ref->{'ids'})
571 1 0 ref $ids ? :
575 5 37 if (my $perms = $param_ref->{'permissions'})
576 4 1 ref $perms ? :
581 3 39 if (my $path = $param_ref->{'source'})
582 0 3 ref $path ? :
584 1 41 if (my $path = $param_ref->{'file'})
585 0 1 ref $path ? :
589 2 40 if (my $field_ref = $param_ref->{'fields'})
596 1 41 if ($object and ref $object eq 'HASH')
609 3 1 if (not $ref) { }
1 0 elsif ($ref eq 'ARRAY') { }
0 0 elsif ($ref eq 'HASH') { }
619 0 0 $r && $r eq 'HASH' ? :
631 0 1 unless $self->namespace
649 1 1 if (ref $settings_ref ne 'ARRAY')