Branch Coverage

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

line%coveragebranch
187100TFunless defined $regex
190100TFref $regex eq 'Regexp' ? :
220100TFif (defined $str and $str =~ /^$regex$/)
2250TFif ($ENV{'DEBUG_REGEX_GEN'} and $@)
23250TFif $str =~ /^$regex$/
24650TFif ($regex_str =~ /\\d/ or $regex_str =~ /\[0-9\]/ or $regex_str =~ /\[\^[^\]]*[A-Za-z]/) { }
50TFelsif ($regex_str =~ /\[A-Z\]/ or $regex_str =~ /\[A-Z[^\]]*\]/) { }
50TFelsif ($regex_str =~ /\[a-z\]/ or $regex_str =~ /\[a-z[^\]]*\]/) { }
50TFelsif ($regex_str =~ /\\w/ or $regex_str =~ /\[a-zA-Z0-9_\]/) { }
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+/)
425100TFif ($pattern =~ /\{(\d+),(\d+)\}/)
427100TFif ($max - $min > 10)
443100TFif ($info->{'features'}{'has_alternation'})
445100TFif (@alts > 10)
45850TFif ($pattern =~ /\(([a-zA-Z])\|([a-zA-Z])\|([a-zA-Z])\)/)
474100TFif ($info->{'features'}{'has_lookahead'} or $info->{'features'}{'has_lookbehind'})
47950TFif ($simpler ne $pattern)
492100TFif ($info->{'features'}{'has_unicode'} and $pattern =~ /\\p\{L\}/)
50650TFif ($pattern =~ /([a-zA-Z]{20,})/)
536100TFunless defined $string
563100TFif $self->{'_pattern_info_cache'}
571100TF$pattern =~ /\|/ ? :
100TF$pattern =~ /(\\[1-9]|\\k<)/ ? :
100TF$pattern =~ /\\p\{/ ? :
100TF$pattern =~ /\(\?[=!]/ ? :
100TF$pattern =~ /\(\?<[=!]/ ? :
100TF$pattern =~ /\(\?</ ? :
100TF$pattern =~ /(?:[+*?]\+|\{\d+(?:,\d*)?\}\+)/ ? :
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 =~ /[+*?]/ or $char eq '{') { }
100TFelsif ($char =~ /[\w ]/) { }
700100TFif ($next =~ /[1-9]/) { }
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 =~ /^\?:/) { }
100TFelsif ($group_content =~ /^\?<([^>]+)>/) { }
100TFelsif ($group_content =~ /^\?=/) { }
100TFelsif ($group_content =~ /^\?!/) { }
100TFelsif ($group_content =~ /^\?<=/) { }
100TFelsif ($group_content =~ /^\?<!/) { }
824100TFif ($is_lookahead) { }
100TFelsif ($is_lookbehind) { }
827100TFunless ($is_negative)
843100TFif ($group_content =~ /\|/) { }
850100TFif ($is_capturing)
854100TFif (defined $group_name)
901100TFif ($check_possessive and $pos + 2 < length $pattern)
903100TFif ($next =~ /[+*?]/ || $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+)$/) { }
50TFelsif ($quant =~ /^(\d+),(\d+)$/) { }
0TFelsif ($quant =~ /^(\d+),$/) { }
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
1037100TFif (substr($class, 0, 1) eq "^")
1047100TFif ($char eq '\\') { }
100TFelsif ($i + 2 < length $class and substr($class, $i + 1, 1) eq '-') { }
1050100TFif ($next eq 'd') { }
100TFelsif ($next eq 'w') { }
50TFelsif ($next eq 's') { }
50TFelsif ($next eq 'p' and substr($class, $i + 1, 1) eq '{') { }
1076100TFif ($negate)
108150TF@chars ? :
108750TF@chars ? :
1094100TFif ($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') { }