Condition Coverage

blib/lib/Apache2/Expression.pm
Criterion Covered Total %
condition 109 244 44.6


and 2 conditions

line l !l condition
59 170 77 ref $opts->{'skip'} eq 'ARRAY' and scalar @{$opts->{'skip'};}
424 24 0 defined $this and scalar keys %$this
779 0 0 defined $this and scalar keys %$this
856 0 0 $self->message(3, 'Looping detected now exiting parsing.') and last PARSE

and 3 conditions

line !l l&&!r l&&r condition
55 0 176 0 $callinfo[0] eq ref $self and substr((caller 1)[3], rindex((caller 1)[3], ':') + 1) ne 'parse'
79 0 211 36 $self->message(3, 'Trying with legacy variable.') and $data =~ /\A\G$RE{'Apache2'}{'LegacyVariable'}\Z/cgms
211 0 36 $self->message(3, 'Trying with legacy variable.') and $data =~ /\A\G$RE{'Apache2'}{'LegacyVariable'}\Z/cgms and length $+{'variable'}
30 0 181 not $skip->{'cond'} and $self->message(3, 'Trying with condition.')
30 0 181 not $skip->{'cond'} and $self->message(3, 'Trying with condition.') and $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Cond"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}Cond"}/cgms
0 133 48 not $skip->{'cond'} and $self->message(3, 'Trying with condition.') and $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Cond"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}Cond"}/cgms and length $+{'cond'}
0 150 13 $self->message(3, 'Trying with string comparison.') and $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}StringComp"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}StringComp"}/cgms
150 0 13 $self->message(3, 'Trying with string comparison.') and $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}StringComp"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}StringComp"}/cgms and length $+{'stringcomp'}
0 147 3 $self->message(3, 'Trying with integer comparison.') and $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}IntegerComp"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}IntegerComp"}/cgms
147 0 3 $self->message(3, 'Trying with integer comparison.') and $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}IntegerComp"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}IntegerComp"}/cgms and length $+{'integercomp'}
0 74 73 $self->message(3, 'Trying with general comparison.') and $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Comp"}\Z/gms || $pos > 0 && $data =~ /\G$RE{'Apache2'}{"${prefix}Comp"}/cgms
123 0 24 $self->message(3, 'Trying with general comparison.') and $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Comp"}\Z/gms || $pos > 0 && $data =~ /\G$RE{'Apache2'}{"${prefix}Comp"}/cgms and length $+{'comp'}
0 123 0 $self->message(3, 'Trying with trunk join.') and $prefix eq 'Trunk'
123 0 0 $self->message(3, 'Trying with trunk join.') and $prefix eq 'Trunk' and $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Join"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}Join"}/cgms
0 0 0 $self->message(3, 'Trying with trunk join.') and $prefix eq 'Trunk' and $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Join"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}Join"}/cgms and length $+{'join'}
0 123 0 $self->message(3, 'Trying with trunk split.') and $prefix eq 'Trunk'
123 0 0 $self->message(3, 'Trying with trunk split.') and $prefix eq 'Trunk' and $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Split"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}Split"}/cgms
0 0 0 $self->message(3, 'Trying with trunk split.') and $prefix eq 'Trunk' and $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Split"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}Split"}/cgms and length $+{'split'}
0 123 0 $self->message(3, 'Trying with legacy variable.') and $prefix eq 'Trunk'
123 0 0 $self->message(3, 'Trying with legacy variable.') and $prefix eq 'Trunk' and $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Sub"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}Sub"}/cgms
0 0 0 $self->message(3, 'Trying with legacy variable.') and $prefix eq 'Trunk' and $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Sub"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}Sub"}/cgms and length $+{'sub'}
0 109 14 $self->message(3, 'Trying with function.') and $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Function"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}Function"}/cgms
109 0 14 $self->message(3, 'Trying with function.') and $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Function"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}Function"}/cgms and length $+{'function'}
0 109 0 $self->message(3, 'Trying with list function.') and $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}ListFunc"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}ListFunc"}/cgms
109 0 0 $self->message(3, 'Trying with list function.') and $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}ListFunc"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}ListFunc"}/cgms and length $+{'listfunc'}
0 101 8 $self->message(3, 'Trying with regex.') and $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Regexp"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}Regexp"}/cgms
101 0 8 $self->message(3, 'Trying with regex.') and $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Regexp"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}Regexp"}/cgms and length $+{'regex'}
0 101 0 $self->message(3, 'Trying with regex any.') and $prefix eq 'Trunk'
101 0 0 $self->message(3, 'Trying with regex any.') and $prefix eq 'Trunk' and $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Regany"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}Regany"}/cgms
0 0 0 $self->message(3, 'Trying with regex any.') and $prefix eq 'Trunk' and $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Regany"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}Regany"}/cgms and length $+{'regany'}
0 101 0 $self->message(3, 'Trying with regsub.') and $prefix eq 'Trunk'
101 0 0 $self->message(3, 'Trying with regsub.') and $prefix eq 'Trunk' and $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Regsub"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}Regsub"}/cgms
0 0 0 $self->message(3, 'Trying with regsub.') and $prefix eq 'Trunk' and $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Regsub"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}Regsub"}/cgms and length $+{'regsub'}
47 0 54 not $skip->{'words'} and $self->message(3, 'Trying with words.')
47 10 44 not $skip->{'words'} and $self->message(3, 'Trying with words.') and $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Words"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}Words"}/cgms
10 0 44 not $skip->{'words'} and $self->message(3, 'Trying with words.') and $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Words"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}Words"}/cgms and length $+{'words'}
0 2 55 $self->message(3, 'Trying with word.') and $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Word"}\Z/gms || $pos > 0 && $data =~ /\G$RE{'Apache2'}{"${prefix}Word"}/cgms
11 0 46 $self->message(3, 'Trying with word.') and $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Word"}\Z/gms || $pos > 0 && $data =~ /\G$RE{'Apache2'}{"${prefix}Word"}/cgms and length $+{'word'}
0 0 11 $self->message(3, 'Trying with string.') and $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}String"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}String"}/cgms
0 0 11 $self->message(3, 'Trying with string.') and $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}String"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}String"}/cgms and length $+{'string'}
146 41 0 7 $re->{'cond_neg'} and $opts->{'top'}
429 0 0 24 $cur_pos == length $data and $self->message(3, 'End of string (', length $data, ' bytes long) reached at pos ', $cur_pos)
905 27 6 0 $e->class eq 'PPI::Token::Operator' and not exists $$op_skip{$e->content}
6 0 6 $e->class eq 'PPI::Token::Operator' and $e->content eq ','
932 0 0 0 ref $elems[$i - 1] and $elems[$i - 1]->class eq 'PPI::Token::Word'
0 0 0 ref $elems[$i - 1] and $elems[$i - 1]->class eq 'PPI::Token::Word' and $argv->[-1][0]->class eq 'PPI::Token::Word'
0 0 0 scalar $e->elements and ref(($e->elements)[0])
0 0 0 scalar $e->elements and ref(($e->elements)[0]) and @expr = $self->_find_expression($e)
0 0 0 scalar $e->elements and ref(($e->elements)[0]) and @expr = $self->_find_expression($e) and $expr[0]->class eq 'PPI::Statement::Expression'

or 2 conditions

line l !l condition
881 15 0 'PPI::Document'->new(\$args, 'readonly', 1) || (return 'Unable to parse: ', 'PPI::Document'->errstr, "\n$args")

or 3 conditions

line l !l&&r !l&&!r condition
55 71 0 176 $callinfo[0] ne ref $self or $callinfo[0] eq ref $self and substr((caller 1)[3], rindex((caller 1)[3], ':') + 1) ne 'parse'
79 48 133 0 $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Cond"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}Cond"}/cgms
13 0 150 $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}StringComp"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}StringComp"}/cgms
3 0 147 $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}IntegerComp"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}IntegerComp"}/cgms
24 49 74 $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Comp"}\Z/gms || $pos > 0 && $data =~ /\G$RE{'Apache2'}{"${prefix}Comp"}/cgms
0 0 0 $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Join"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}Join"}/cgms
0 0 0 $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Split"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}Split"}/cgms
0 0 0 $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Sub"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}Sub"}/cgms
14 0 109 $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Function"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}Function"}/cgms
0 0 109 $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}ListFunc"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}ListFunc"}/cgms
8 0 101 $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Regexp"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}Regexp"}/cgms
0 0 0 $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Regany"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}Regany"}/cgms
0 0 0 $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Regsub"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}Regsub"}/cgms
44 0 10 $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Words"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}Words"}/cgms
46 9 2 $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}Word"}\Z/gms || $pos > 0 && $data =~ /\G$RE{'Apache2'}{"${prefix}Word"}/cgms
11 0 0 $pos == 0 && $data =~ /\A$RE{'Apache2'}{"${prefix}String"}\Z/gms || $data =~ /\G$RE{'Apache2'}{"${prefix}String"}/cgms
147 0 1 39 length $re->{'cond_and'} or length $re->{'cond_or'}
5 4 0 length $re->{'cond_true'} or length $re->{'cond_false'}
316 0 6 0 length $re->{'comp_in_regexp'} or length $re->{'comp_in_regexp_legacy'}
742 39 0 0 length $re->{'word_quote'} or length $re->{'word_parens_open'}
0 0 0 length $re->{'word_function'} or length $re->{'word_variable'}
776 0 0 0 $re->{'word_function'} || $re->{'word_variable'}
905 0 0 33 $e->class eq 'PPI::Token::ArrayIndex' or $e->isa('PPI::Token::Number')
0 0 33 $e->class eq 'PPI::Token::ArrayIndex' or $e->isa('PPI::Token::Number') or $e->class eq 'PPI::Token::Operator' and not exists $$op_skip{$e->content}
0 16 17 $e->class eq 'PPI::Token::ArrayIndex' or $e->isa('PPI::Token::Number') or $e->class eq 'PPI::Token::Operator' and not exists $$op_skip{$e->content} or $e->isa('PPI::Token::Quote')
16 0 17 $e->class eq 'PPI::Token::ArrayIndex' or $e->isa('PPI::Token::Number') or $e->class eq 'PPI::Token::Operator' and not exists $$op_skip{$e->content} or $e->isa('PPI::Token::Quote') or $e->isa('PPI::Token::QuoteLike')
16 2 15 $e->class eq 'PPI::Token::ArrayIndex' or $e->isa('PPI::Token::Number') or $e->class eq 'PPI::Token::Operator' and not exists $$op_skip{$e->content} or $e->isa('PPI::Token::Quote') or $e->isa('PPI::Token::QuoteLike') or $e->isa('PPI::Token::Regexp')
2 3 12 $e->class eq 'PPI::Token::ArrayIndex' or $e->isa('PPI::Token::Number') or $e->class eq 'PPI::Token::Operator' and not exists $$op_skip{$e->content} or $e->isa('PPI::Token::Quote') or $e->isa('PPI::Token::QuoteLike') or $e->isa('PPI::Token::Regexp') or $e->isa('PPI::Token::Symbol')
5 0 12 $e->class eq 'PPI::Token::ArrayIndex' or $e->isa('PPI::Token::Number') or $e->class eq 'PPI::Token::Operator' and not exists $$op_skip{$e->content} or $e->isa('PPI::Token::Quote') or $e->isa('PPI::Token::QuoteLike') or $e->isa('PPI::Token::Regexp') or $e->isa('PPI::Token::Symbol') or $e->class eq 'PPI::Token::Word'