Branch Coverage

blib/lib/Perl/Critic/Policy/RegularExpressions/ProhibitEnumeratedClasses.pm
Criterion Covered Total %
branch 26 28 92.8


line true false branch
49 1 25 unless $elem =~ /\[/msx
51 0 25 unless my $re = $document->ppix_regexp_from_element($elem)
52 1 24 if $re->failures
54 0 24 unless my $anyofs = $re->find("PPIx::Regexp::Structure::CharClass")
58 19 5 if $violation = $self->_get_character_class_violations($elem, $anyof)
74 23 74 if (&all(sub {
76 10 13 $neg ? :
77 2 21 unless defined $improvement
79 4 17 if ($neg and not defined $PATTERNS[$i + 1][0])
82 2 2 if 1 != scalar keys %elements
85 8 11 $neg ? :
102 79 50 if ($element->isa('PPIx::Regexp::Token::Literal')) { }
22 28 elsif ($element->isa('PPIx::Regexp::Node')) { }
104 23 56 if exists $ORDINALS{$ord}