Branch Coverage

blib/lib/Net/OAuth/Message.pm
Criterion Covered Total %
branch 48 62 77.4


line true false branch
66 9 37 if (defined $protocol_version and $protocol_version == 1.001 and not $class =~ /\::V1_0A\::/)
68 7 2 if Net::OAuth::smart_require($versioned_class)
76 29 8 unless $$self{'from_hash'}
88 3 218 unless (defined $$self{$k})
92 30 4 if ($$self{'extra_params'} and $self->allow_extra_params)
94 0 22 if ($k =~ /$OAUTH_PREFIX_RE/)
103 14 919 unless defined $str
104 933 0 unless ($Net::OAuth::SKIP_UTF8_DOUBLE_ENCODE_CHECK)
105 1 932 if ($str =~ /[\x80-\xFF]/ and not utf8::is_utf8($str))
124 56 4 unless defined $opts{'quote'}
128 42 344 if $k eq 'signature' and not $self->sign_message && grep(($_ eq 'signature'), @{$opts{'add'};})
129 3 341 $self->is_extension_param($k) ? :
131 343 1 if defined $v
133 50 10 if ($$self{'extra_params'} and not $opts{'no_extra'} and $self->allow_extra_params)
137 40 10 if ($self->can('request_url'))
145 8 52 if ($opts{'hash'})
181 0 36 unless Net::OAuth::smart_require($sm_class)
189 4 0 if (defined $realm) { }
203 0 1 unless $header =~ s/OAuth //
205 1 0 if $header[0] =~ /^realm=/i
212 0 4 if (ref $pairs ne 'ARRAY')
218 16 0 if (defined $k and defined $v)
231 0 9 if (ref $hash ne 'HASH')
241 46 2 if ($k =~ s/$OAUTH_PREFIX_RE//) { }
0 2 elsif ($class->is_extension_param($k)) { }
242 1 45 if (not grep(($_ eq $k), @{$class->all_message_params;})) { }
250 0 0 if (not grep(($_ eq $k), @{$class->all_message_params;})) { }
266 1 81 UNIVERSAL::isa($_[0], 'URI') ? :
297 5 0 if (not defined $url and $self->can('request_url') and defined $self->request_url)
300 8 0 if (defined $url) { }
308 8 41 if $sep eq '?'