Branch Coverage

blib/lib/JE/Object/RegExp.pm
Criterion Covered Total %
branch 117 148 79.0


line true false branch
247 56 319 if (defined blessed($re)) { }
248 0 56 if ($re->isa('JE::Object::RegExp')) { }
2 54 elsif ($re->can('id') and $re->id eq 'undef') { }
54 0 elsif ($re->can('to_string')) { }
249 0 0 if defined $flags and eval { do { $flags->id } } ne 'undef'
267 2 317 unless defined $re
270 0 375 if (defined blessed($flags)) { }
271 0 0 if ($flags->can('id') and $flags->id eq 'undef') { }
0 0 elsif ($flags->can('to_string')) { }
279 58 317 unless defined $flags
301 2 373 unless $flags =~ /^((?:(?!s)[\$_\p{ID_Continue}])*)\z/ and eval "qr//$1"
334 373 0 unless (defined $qr)
395 1 1213 unless @stack
399 0 70 $stack[-1][1] == 4 || $stack[-1][1] == 3 ? :
12 1131 $stack[-1][1] == 4 || $stack[-1][1] == 3 ? :
70 1143 $stack[-1][2] ? :
28 505 $stack[-1][2] ? :
28 504 $stack[-1][2] ? :
566 647 if ($stack[-1][2] ? $stack[-1][1] == 4 || $stack[-1][1] == 3 ? $re =~ s/$plain_regexp_x_mode_wo_pipe// : $re =~ s/$plain_regexp_x_mode// : ($stack[-1][1] == 4 || $stack[-1][1] == 3 ? $re =~ s/$plain_regexp_wo_pipe// : $re =~ s/$plain_regexp//)) { }
114 533 elsif ($re =~ s/^\[([^]\\]*(?:\\.[^]\\]*)*)]//s) { }
1 532 elsif ($stack[-1][2] ? $re =~ s/^(\(\s*\?([\w]*)(?:-([\w]*))?\))// : $re =~ s/^(\( \?([\w]*)(?:-([\w]*))?\))//x) { }
261 271 elsif ($stack[-1][2] ? $re =~ s/^(\((?:\s*\?([\w-]*:|[^:{?
263 8 elsif ($re =~ s/^\)//) { }
2 6 elsif ($re =~ s/^\|//) { }
0 6 elsif ($re) { }
421 6 28 $m ? :
6 23 $m ? :
34 29 $1 eq '^' ? :
5 130 defined $5 ? :
25 135 defined $4 ? :
6 160 defined $3 ? :
211 166 defined $2 ? :
63 377 defined $1 ? :
442 2 112 if ($1 eq '') { }
11 101 elsif ($1 eq '^') { }
463 0 16 $2 ? :
1 15 $4 ? :
1 49 defined $7 ? :
3 50 defined $6 ? :
13 53 defined $5 ? :
16 66 defined $3 ? :
8 82 defined $1 ? :
476 1 89 @full_classes ? :
10 1 @full_classes == 1 ? :
90 11 length $sub_pat ? :
496 1 0 defined $3 && index($3, 'x') + 1 ? :
507 0 261 if $3
516 62 199 if (defined $caq) { }
517 4 58 if ($caq eq '(') { }
0 58 elsif ($caq =~ /^[<'P](?![!=])/) { }
520 0 4 if $1 =~ /^\?[?p]?\{/
530 0 0 $caq eq q['] ? :
538 26 36 $caq eq '!' ? :
555 237 26 if ($$cur[1] != 2) { }
556 199 38 if ($$cur[1] == 1)
563 13 16 if ($$cur[3] and @{$$cur[3];} and $re =~ /^[+{*?]/)
574 19 7 unless $$cur[3] and @{$$cur[3];}
582 3 4 if $re =~ /^[+{*?]/
593 1 1 if ($$cur[3] and @{$$cur[3];})
610 0 0 $re =~ /^\[/ ? :
616 841 372 if length $re
618 1 371 unless @stack
621 31 340 if $new_re =~ /\(\?=/
625 2 369 unless $qr = eval { do { BEGIN {${^WARNING_BITS} = "TUUUUTU\000\000\@U\024\@UU\025"} no strict; local $^W; $capture_num ? qr/(?$flags:$clear_captures(?:$new_re)$save_captures)/ : qr/(?$flags:$clear_captures$new_re)/ } }
636 88 283 $capture_num ? :
698 0 170 unless $self->class eq 'RegExp'
705 170 0 if (defined $str) { }
717 0 170 if ($g) { }
721 0 0 if $pos < 0 or $pos > length $str or pos $str = $pos, !($str =~ /$$$self{'value'}/g)
744 21 149 unless $str =~ /$$$self{'value'}/
762 149 0 defined $je_str ? :
809 0 0 if ($re->class eq 'RegExp' and !defined($flags) || $flags->id eq 'undef')
886 0 14 unless $self->class eq 'RegExp'
909 0 1 unless $self->class eq 'RegExp'