Branch Coverage

File:blib/lib/Data/Random/String/Matches.pm
Coverage:84.0%

line%coveragebranch
187100TFunless defined $regex
190100TFref $regex eq 'Regexp' ? :
220100TFif (defined $str and $str =~ /^$regex$/u)
2250TFif ($ENV{'DEBUG_REGEX_GEN'} and $@)
232100TFif $str =~ /^$regex$/u
24650TFif ($regex_str =~ /\\d/u or $regex_str =~ /\[0-9\]/u or $regex_str =~ /\[\^[^\]]*[A-Za-z]/u) { }
50TFelsif ($regex_str =~ /\[A-Z\]/u or $regex_str =~ /\[A-Z[^\]]*\]/u) { }
50TFelsif ($regex_str =~ /\[a-z\]/u or $regex_str =~ /\[a-z[^\]]*\]/u) { }
50TFelsif ($regex_str =~ /\\w/u or $regex_str =~ /\[a-zA-Z0-9_\]/u) { }
316100TFunless defined $count and $count > 0
320100TFif ($unique) { }
332100TFif (keys %seen < $count)
368100TFunless defined $seed
398100TFif ($info->{'complexity'} eq "very_complex")
41150TFif ($info->{'features'}{'has_backreferences'} and $pattern =~ /(\(\w+\)).*\\\d+/u)
425100TFif ($pattern =~ /\{(\d+),(\d+)\}/u)
427100TFif ($max - $min > 10)
443100TFif ($info->{'features'}{'has_alternation'})
445100TFif (@alts > 10)
45850TFif ($pattern =~ /\(([a-zA-Z])\|([a-zA-Z])\|([a-zA-Z])\)/u)
474100TFif ($info->{'features'}{'has_lookahead'} or $info->{'features'}{'has_lookbehind'})
47950TFif ($simpler ne $pattern)
492100TFif ($info->{'features'}{'has_unicode'} and $pattern =~ /\\p\{L\}/u)
50650TFif ($pattern =~ /([a-zA-Z]{20,})/u)
536100TFunless defined $string
563100TFif $self->{'_pattern_info_cache'}
571100TF$pattern =~ /\|/u ? :
100TF$pattern =~ /(\\[1-9]|\\k<)/u ? :
100TF$pattern =~ /\\p\{/u ? :
100TF$pattern =~ /\(\?[=!]/u ? :
100TF$pattern =~ /\(\?<[=!]/u ? :
100TF$pattern =~ /\(\?</u ? :
100TF$pattern =~ /(?:[+*?]\+|\{\d+(?:,\d*)?\}\+)/u ? :
609100TFif (defined $1 or defined $2 and $2) { }
100TFelsif (defined $3) { }
614100TFif ($last_was_atom) { }
617100TFdefined $4 ? :
622100TFdefined $4 ? :
63650TFif $min < 0
63750TFif $max < $min
651100TFif $features->{'has_alternation'}
652100TFif $features->{'has_backreferences'}
653100TFif $features->{'has_unicode'}
654100TFif $features->{'has_lookahead'}
655100TFif $features->{'has_lookbehind'}
656100TFif $features->{'has_named_groups'}
657100TFif $features->{'has_possessive'}
660100TFif $score < 3
661100TFif $score < 7
662100TFif $score < 12
695100TFif ($char eq '\\') { }
100TFelsif ($char eq '[') { }
100TFelsif ($char eq '(') { }
100TFelsif ($char eq '.') { }
50TFelsif ($char eq '|') { }
100TFelsif ($char =~ /[+*?]/u or $char eq '{') { }
100TFelsif ($char =~ /[\w ]/u) { }
700100TFif ($next =~ /[1-9]/u) { }
100TFelsif ($next eq 'k' and substr($pattern, $i + 1, 1) eq '<') { }
100TFelsif ($next eq 'p' and substr($pattern, $i + 1, 1) eq '{') { }
100TFelsif ($next eq 'd') { }
100TFelsif ($next eq 'w') { }
100TFelsif ($next eq 's') { }
100TFelsif ($next eq 'D') { }
100TFelsif ($next eq 'W') { }
100TFelsif ($next eq 't') { }
100TFelsif ($next eq 'n') { }
50TFelsif ($next eq 'r') { }
70350TFif (exists $self->{'backrefs'}{$ref_num}) { }
71250TFif (exists $self->{'named_refs'}{$name}) { }
76950TFif $end == -1
78050TFif $end == -1
791100TFif ($group_content =~ /^\?:/u) { }
100TFelsif ($group_content =~ /^\?<([^>]+)>/u) { }
100TFelsif ($group_content =~ /^\?=/u) { }
100TFelsif ($group_content =~ /^\?!/u) { }
100TFelsif ($group_content =~ /^\?<=/u) { }
100TFelsif ($group_content =~ /^\?<!/u) { }
824100TFif ($is_lookahead) { }
100TFelsif ($is_lookbehind) { }
827100TFunless ($is_negative)
843100TFif ($group_content =~ /\|/u) { }
850100TFif ($is_capturing)
854100TFif (defined $group_name)
901100TFif ($check_possessive and $pos + 2 < length $pattern)
903100TFif ($next =~ /[+*?]/u || $next eq '}' and $after_next eq "+")
908100TFif ($next eq '{') { }
100TFelsif ($next eq '+') { }
100TFelsif ($next eq '*') { }
100TFelsif ($next eq '?') { }
91050TFif $end == -1
914100TFif ($check_possessive and $end + 1 < length $pattern and substr($pattern, $end + 1, 1) eq "+")
920100TFif ($quant =~ /^(\d+)$/u) { }
50TFelsif ($quant =~ /^(\d+),(\d+)$/u) { }
0TFelsif ($quant =~ /^(\d+),$/u) { }
936100TFif ($is_possessive)
946100TFif ($is_possessive)
956100TFif ($is_possessive)
95950TFrand() < 0.5 ? :
976100TFif ($char eq '(') { }
100TFelsif ($char eq ')') { }
100TFelsif ($char eq '|' and $depth == 0) { }
98950TFif length $current
1002100TFif ($char eq '[' and $i == $start || substr($pattern, $i - 1, 1) ne '\\') { }
100TFelsif ($char eq ']' and substr($pattern, $i - 1, 1) ne '\\') { }
100650TFif $depth == 0
1018100TF$i > 0 ? :
1020100TFif ($char eq '(' and $prev ne '\\') { }
100TFelsif ($char eq ')' and $prev ne '\\') { }
1024100TFif $depth == 0
103750TFif $ENV{'DEBUG_REGEX_GEN'}
1041100TFif (substr($class, 0, 1) eq "^")
105150TFif $ENV{'DEBUG_REGEX_GEN'}
1053100TFif ($char eq '\\') { }
100TFelsif ($i + 2 < length $class and substr($class, $i + 1, 1) eq '-') { }
105650TFif $ENV{'DEBUG_REGEX_GEN'}
1057100TFif ($next eq 'd') { }
100TFelsif ($next eq 'w') { }
50TFelsif ($next eq 's') { }
100TFelsif ($next eq 'p' and substr($class, $i + 1, 1) eq '{') { }
107850TFif ($end_char eq '\\' or $end_char eq ']') { }
50TFelsif (ord $end_char >= ord $char) { }
109750TFif $ENV{'DEBUG_REGEX_GEN'}
1099100TFif ($negate)
110450TF@chars ? :
111050TF@chars ? :
1117100TFif ($prop eq 'L' or $prop eq 'Letter') { }
100TFelsif ($prop eq 'N' or $prop eq 'Number') { }
100TFelsif ($prop eq 'Lu' or $prop eq 'Uppercase_Letter') { }
50TFelsif ($prop eq 'Ll' or $prop eq 'Lowercase_Letter') { }
0TFelsif ($prop eq 'P' or $prop eq 'Punctuation') { }
0TFelsif ($prop eq 'S' or $prop eq 'Symbol') { }
0TFelsif ($prop eq 'Z' or $prop eq 'Separator') { }
0TFelsif ($prop eq 'Nd' or $prop eq 'Decimal_Number') { }