Branch Coverage

blib/lib/JE/Object/RegExp.pm
Criterion Covered Total %
branch 119 150 79.3


line true false branch
246 56 319 if (defined blessed($re)) { }
247 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')) { }
248 0 0 if defined $flags and eval { do { $flags->id } } ne 'undef'
266 2 317 unless defined $re
269 0 375 if (defined blessed($flags)) { }
270 0 0 if ($flags->can('id') and $flags->id eq 'undef') { }
0 0 elsif ($flags->can('to_string')) { }
278 58 317 unless defined $flags
300 2 373 unless $flags =~ /^((?:(?!s)[\$_\p{ID_Continue}])*)\z/ and eval "qr//$1"
330 374 2 defined $1 ? :
338 373 0 unless (defined $qr)
399 1 1213 unless @stack
403 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) { }
425 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 ? :
446 2 112 if ($1 eq '') { }
11 101 elsif ($1 eq '^') { }
467 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 ? :
480 1 89 @full_classes ? :
10 1 @full_classes == 1 ? :
90 11 length $sub_pat ? :
500 1 0 defined $3 && index($3, 'x') + 1 ? :
511 0 261 if $3
520 62 199 if (defined $caq) { }
521 4 58 if ($caq eq '(') { }
0 58 elsif ($caq =~ /^[<'P](?![!=])/) { }
524 0 4 if $1 =~ /^\?[?p]?\{/
534 0 0 $caq eq q['] ? :
542 26 36 $caq eq '!' ? :
559 237 26 if ($$cur[1] != 2) { }
560 199 38 if ($$cur[1] == 1)
567 13 16 if ($$cur[3] and @{$$cur[3];} and $re =~ /^[+{*?]/)
578 19 7 unless $$cur[3] and @{$$cur[3];}
586 3 4 if $re =~ /^[+{*?]/
597 1 1 if ($$cur[3] and @{$$cur[3];})
614 0 0 $re =~ /^\[/ ? :
620 841 372 if length $re
622 1 371 unless @stack
625 31 340 if $new_re =~ /\(\?=/
629 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)/ } }
640 88 283 $capture_num ? :
702 0 170 unless $self->class eq 'RegExp'
709 170 0 if (defined $str) { }
721 0 170 if ($g) { }
725 0 0 if $pos < 0 or $pos > length $str or pos $str = $pos, !($str =~ /$$$self{'value'}/g)
748 21 149 unless $str =~ /$$$self{'value'}/
766 149 0 defined $je_str ? :
813 0 0 if ($re->class eq 'RegExp' and !defined($flags) || $flags->id eq 'undef')
890 0 14 unless $self->class eq 'RegExp'
913 0 1 unless $self->class eq 'RegExp'