Branch Coverage

blib/lib/Unicode/String.pm
Criterion Covered Total %
branch 72 110 65.4


line true false branch
71 2 52 if @_
89 0 0 if (defined $_) { }
92 0 0 unless CORE::length $x
107 2 2 unless (UNIVERSAL::isa($other, 'Unicode::String'))
110 1 3 $reversed ? :
119 0 20 unless (UNIVERSAL::isa($other, 'Unicode::String'))
148 2 1 $$self ? :
167 0 3 if (@_ > 1) { }
169 0 0 if ref $class
174 3 0 if (@_)
177 1 2 unless exists $stringify{$as}
187 29 49 unless (ref $self)
193 31 18 if (@_)
195 1 30 if (CORE::length($$self) % 2 != 0)
196 1 0 if $^W
199 2 29 if ($$self =~ /^\xFF\xFE/)
211 2 1 unless (ref $self)
217 0 1 if (@_)
227 1 1 unless (ref $self)
233 0 1 if (@_)
243 10 22 unless (ref $self)
250 12 10 if (defined wantarray)
256 19 23 if ($Unicode::String::UTF7_OPTIONAL_DIRECT_CHARS and $$self =~ /\G((?:\0[A-Za-z0-9\'\(\)\,\-\.\/\:\?\!\"\#\$\%\&\*\;\<\=\>\@\[\]\^\_\`\{\|\}\s])+)/cg or $$self =~ m[\G((?:\0[A-Za-z0-9\'\(\)\,\-\./\:\?\s])+)]cg) { }
23 0 elsif ($Unicode::String::UTF7_OPTIONAL_DIRECT_CHARS and $$self =~ /\G((?:[^\0].|\0[^A-Za-z0-9\'\(\)\,\-\.\/\:\?\!\"\#\$\%\&\*\;\<\=\>\@\[\]\^\_\`\{\|\}\s])+)/cgs or $$self =~ m[\G((?:[^\0].|\0[^A-Za-z0-9\'\(\)\,\-\./\:\?\s])+)]cgs) { }
268 2 21 if ($1 eq "\000+") { }
286 11 11 if (@_)
292 18 22 if ($_[0] =~ /\G([^+]+)/cg) { }
2 20 elsif ($_[0] =~ /\G\+-/cg) { }
20 0 elsif ($_[0] =~ m[\G\+([A-Za-z0-9+/]+)-?]cg) { }
0 0 elsif ($_[0] =~ /\G\+/cg) { }
299 16 4 if $pad
302 0 20 if (CORE::length($$self) % 2 != 0)
303 0 0 if $^W
307 0 0 if $^W
321 0 27 unless (ref $self)
327 27 0 if (defined $$self and defined wantarray)
332 0 27 if (@_)
335 0 0 unless CORE::length($new) % 4 == 0
374 0 12 unless defined $$self
379 4 8 if ($array) { }
387 6 14 if ($first >= 55296 and $first <= 57343) { }
390 1 4 if ($first >= 56320 or $second < 56320 or $second > 57343)
400 8 10 unless $array
402 4 8 $array ? :
410 0 0 if (wantarray) { }
421 4 4 unless (ref $self)
426 2 2 if ($val > 65535) { }
428 0 2 if $val > 1114111
446 0 6 if (defined $substitute) { }
447 0 0 unless (UNIVERSAL::isa($substitute, 'Unicode::String'))
450 0 0 if (defined $length) { }
456 4 2 if (defined $length) { }
471 0 5 unless ref $other
473 2 3 if $pos > 0
489 0 0 if (CORE::length $$self)