Condition Coverage

blib/lib/Template/Alloy/Parse.pm
Criterion Covered Total %
condition 133 190 70.0


and 3 conditions

line !l l&&!r l&&r condition
181 641 15444 102 not $is_aq and $$str_ref =~ / \G ($Template::Alloy::Parse::QR_OP_PREFIX) /cgox
192 641 12581 18 not $is_aq and $$str_ref =~ / \G qw ([^\w\s]) \s* /cgox
540 5657 47 not $is_aq and $$str_ref =~ m[ \G / ]cgx
472 2858 315 not $is_aq and $$str_ref =~ / \G \[ /cgx
472 2661 197 not $is_aq and $$str_ref =~ / \G \{ /cgx
472 2433 228 not $is_aq and $$str_ref =~ / \G ([\$\@]?) \( /cgx
218 6930 3 45 $self->{'NAMESPACE'} and $self->{'NAMESPACE'}{$1}
249 661 34 40 defined $pieces[-1] and not ref $pieces[-1]
253 0 0 21 defined $pieces[-1] and not ref $pieces[-1]
258 0 0 16 defined $pieces[-1] and not ref $pieces[-1]
275 4 94 8 not $not and $self->{'SHOW_UNDEFINED_INTERP'}
280 53 617 51 @pieces == 1 and ref $pieces[0]
305 200 0 3 $self->{'NAMESPACE'} and $self->{'NAMESPACE'}{$1}
395 3098 152 15 $1 eq '|' and $self->{'V2PIPE'}
460 19 6802 5849 $self->{'_end_tag'} and $$str_ref =~ / \G [+=~-]? $self->{'_end_tag'} /cgx
467 1020 72 1955 $Template::Alloy::Parse::OP_ASSIGN->{$1} and not $ARGS->{'allow_parened_ops'}
473 1056 24 12 $op eq '==' and !defined($self->{'V2EQUALS'}) || $self->{'V2EQUALS'}
474 1083 3 6 $op eq '!=' and !defined($self->{'V2EQUALS'}) || $self->{'V2EQUALS'}
477 1074 0 9 $has_prefix and $Template::Alloy::Parse::OP->{$op}[1] < $$Template::Alloy::Parse::OP_PREFIX{$has_prefix->[-1]}[1]
508 687 27 30 $$Template::Alloy::Parse::OP{$tree->[0]}[0] eq 'assign' and $tree->[0] =~ /(.+)=/
598 24 6 9 $type eq 'assign' and $ops[$_ - 1] =~ /(.+)=$/
631 3063 1300 316 not $ARGS->{'is_parened'} || $ARGS->{'require_arg'} and $$str_ref =~ / \G \s* $QR_COMMENTS $QR_DIRECTIVE (?: \s+ | (?: \s* $QR_COMMENTS (?: ;|[+=~-]?$end))) /cgox
4363 0 316 not $ARGS->{'is_parened'} || $ARGS->{'require_arg'} and $$str_ref =~ / \G \s* $QR_COMMENTS $QR_DIRECTIVE (?: \s+ | (?: \s* $QR_COMMENTS (?: ;|[+=~-]?$end))) /cgox and (pos $$str_ref = $mark) || 1
0 290 26 not $ARGS->{'is_parened'} || $ARGS->{'require_arg'} and $$str_ref =~ / \G \s* $QR_COMMENTS $QR_DIRECTIVE (?: \s+ | (?: \s* $QR_COMMENTS (?: ;|[+=~-]?$end))) /cgox and (pos $$str_ref = $mark) || 1 and $$DIRECTIVES{$self->{'ANYCASE'} ? uc $1 : $1}
664 1467 0 0 $ARGS->{'require_arg'} and not @args
1467 0 0 $ARGS->{'require_arg'} and not @args and not $ARGS->{'positional_only'}
0 0 0 $ARGS->{'require_arg'} and not @args and not $ARGS->{'positional_only'} and not @named
678 0 6 591 ref $name and @$name == 2
6 0 591 ref $name and @$name == 2 and not $name->[1]
871 0 0 136 $hash = $self->play_expr($args->[0]) and UNIVERSAL::isa($hash, 'HASH')
897 33 631 140 $initial_op eq '=' and $$str_ref =~ / \G \s* $QR_COMMENTS $QR_DIRECTIVE /cgx
664 0 140 $initial_op eq '=' and $$str_ref =~ / \G \s* $QR_COMMENTS $QR_DIRECTIVE /cgx and (pos $$str_ref -= length $1) || 1
0 65 75 $initial_op eq '=' and $$str_ref =~ / \G \s* $QR_COMMENTS $QR_DIRECTIVE /cgx and (pos $$str_ref -= length $1) || 1 and $$DIRECTIVES{$self->{'ANYCASE'} ? uc $1 : $1}
920 0 386 13 $op eq '=' and $$str_ref =~ / \G \s* $QR_COMMENTS $QR_DIRECTIVE /cgx
386 0 13 $op eq '=' and $$str_ref =~ / \G \s* $QR_COMMENTS $QR_DIRECTIVE /cgx and (pos $$str_ref -= length $1) || 1
0 6 7 $op eq '=' and $$str_ref =~ / \G \s* $QR_COMMENTS $QR_DIRECTIVE /cgx and (pos $$str_ref -= length $1) || 1 and $$DIRECTIVES{$self->{'ANYCASE'} ? uc $1 : $1}
989 3 98 0 defined(my $_var = $self->parse_expr($str_ref, {'auto_quote', "(\\w+\\b) (?! \\.) \\s* $QR_COMMENTS"})) and $$str_ref =~ / \G = >? \s* $QR_COMMENTS /cgox || (pos $$str_ref = $mark) && 0
1039 0 0 0 ref $node and $node->[4] || $node->[5]

or 2 conditions

line l !l condition
130 693 4159 $_[0]{'SYNTAX'} || 'alloy'
140 2414 15240 shift() || {}
176 18 9 $args || [['this', 0]]
193 0 0 eval { do { hex $1 } } || 0
501 210 865 $tree ||= []
621 2153 0 shift() || {}
626 2139 14 $self->{'_end_tag'} || '(?!)'
631 316 0 (pos $$str_ref = $mark) || 1
685 289 2231 $$str_ref =~ / \G \s* $QR_COMMENTS , /cgox || 0
703 459 0 $self->{'_end_tag'} || '(?!)'
897 140 0 (pos $$str_ref -= length $1) || 1
902 0 75 $node->[4] ||= []
920 13 0 (pos $$str_ref -= length $1) || 1
925 0 7 $node->[4] ||= []

or 3 conditions

line l !l&&r !l&&!r condition
131 4849 3 0 $Template::Alloy::Parse::SYNTAX->{$syntax} || $_[0]->throw('config', qq[Unknown SYNTAX "$syntax"])
158 45 0 0 $self->parse_expr($str_ref) || $self->throw('parse', 'Missing variable', undef, pos $$str_ref)
272 64 0 0 $self->parse_expr($str_ref) || $self->throw('parse', 'Error while parsing for interpolated string', undef, pos $$str_ref)
370 472 4 2429 $is_aq or $has_prefix
473 12 6 18 !defined($self->{'V2EQUALS'}) || $self->{'V2EQUALS'}
474 3 3 3 !defined($self->{'V2EQUALS'}) || $self->{'V2EQUALS'}
572 15 12 47 $type eq 'right' or $type eq 'assign'
578 0 0 57 not $ops[1] or $ops[1] eq $op
631 2443 620 1616 $ARGS->{'is_parened'} || $ARGS->{'require_arg'}
818 8 0 5 @$ref < 3 or $ref->[-3] ne '|'
834 18 0 0 $self->parse_expr($str_ref) || $self->throw('parse', 'Missing variable on LOOP directive', undef, pos $$str_ref)
950 57 0 0 $$TAGS{lc $1} || $self->throw('parse', qq[Invalid TAGS name "$1"], undef, pos $$str_ref)
955 9 0 0 $self->parse_expr($str_ref, {'auto_quote', "(\\S+) \\s+ $QR_COMMENTS"}) || $self->throw('parse', 'Invalid opening tag in TAGS', undef, pos $$str_ref)
959 9 0 0 $self->parse_expr($str_ref, {'auto_quote', "(\\S+) \\s* $QR_COMMENTS"}) || $self->throw('parse', 'Invalid closing tag in TAGS', undef, pos $$str_ref)
989 7 0 91 $$str_ref =~ / \G = >? \s* $QR_COMMENTS /cgox || (pos $$str_ref = $mark) && 0
1039 0 0 0 $node->[4] || $node->[5]