Condition Coverage

blib/lib/WWW/Shopify/Liquid/Lexer.pm
Criterion Covered Total %
condition 203 246 82.5


and 3 conditions

line !l l&&!r l&&r condition
57 0 0 0 $inner_self and &blessed($inner_self)
0 0 0 $inner_self and &blessed($inner_self) and not ref $method
84 0 0 3038 defined $key and $key ne ''
85 3 2770 265 $self->is_processed($key) and $action eq 'optimize'
87 2945 0 2 &blessed($place) and $place->isa('WWW::Shopify::Liquid::Resolver')
10 27 2908 &reftype($place) and &reftype($place) eq 'HASH'
37 2908 0 &reftype($place) and &reftype($place) eq 'HASH' and exists $place->{$key}
10 161 27 &reftype($place) and &reftype($place) eq 'ARRAY'
171 1 26 &reftype($place) and &reftype($place) eq 'ARRAY' and &looks_like_number($key)
162 5 21 &reftype($place) and &reftype($place) eq 'ARRAY' and &looks_like_number($key) and defined $place->[$key]
177 0 0 $pipeline->make_method_calls and &blessed($place)
177 0 0 $pipeline->make_method_calls and &blessed($place) and $place->can($key)
104 2015 31 1 &blessed($place) and $place->isa('WWW::Shopify::Liquid::Resolver')
167 0 0 7 int grep({$members[$_]->isa('WWW::Shopify::Liquid::Token::Separator') if $_ % 2 == 0;} 0 .. $#members) == 0 and int grep({not $members[$_]->isa('WWW::Shopify::Liquid::Token::Separator') or $members[$_]{'core'} ne ',' if $_ % 2 == 1;} 0 .. $#members) == 0
205 42 6 0 $_ % 4 == 3 and !$members[$_]->isa('WWW::Shopify::Liquid::Token::Separator') || $members[$_]{'core'} ne ','
34 14 0 $_ % 4 == 1 and !$members[$_]->isa('WWW::Shopify::Liquid::Token::Separator') || $members[$_]{'core'} ne ':'
207 0 0 14 int grep({$members[$_]->isa('WWW::Shopify::Liquid::Token::Separator') if $_ % 2 == 0;} 0 .. $#members) == 0 and int grep({$_ % 4 == 3 and !$members[$_]->isa('WWW::Shopify::Liquid::Token::Separator') || $members[$_]{'core'} ne ',' unless $_ % 4 == 1 and !$members[$_]->isa('WWW::Shopify::Liquid::Token::Separator') || $members[$_]{'core'} ne ':';} 0 .. $#members) == 0
0 0 14 int grep({$members[$_]->isa('WWW::Shopify::Liquid::Token::Separator') if $_ % 2 == 0;} 0 .. $#members) == 0 and int grep({$_ % 4 == 3 and !$members[$_]->isa('WWW::Shopify::Liquid::Token::Separator') || $members[$_]{'core'} ne ',' unless $_ % 4 == 1 and !$members[$_]->isa('WWW::Shopify::Liquid::Token::Separator') || $members[$_]{'core'} ne ':';} 0 .. $#members) == 0 and int(grep {not $_->isa('WWW::Shopify::Liquid::Token::Separator');} @members) % 2 == 0
264 856 775 170 $package->is_enclosing and $package->inner_halt_lexing
303 1223 579 61 $sym and $sym eq ']'
304 1223 629 11 $sym and $sym eq '}'
305 56 24 1783 $sym eq '.' || $sym eq ']' || $sym eq '[' || $sym eq '{' || $sym eq '}' || !$sym and $open_square_bracket == 0
80 10 1773 $sym eq '.' || $sym eq ']' || $sym eq '[' || $sym eq '{' || $sym eq '}' || !$sym and $open_square_bracket == 0 and $open_curly_bracket == 0
308 0 30 1743 defined $contents and not $contents =~ /^\s*$/
331 20 36 1795 $sym ne '"' and $sym ne q[']
56 13 1782 $sym ne '"' and $sym ne q['] and not $open_curly_bracket
49 21 1761 $sym ne '"' and $sym ne q['] and not $open_curly_bracket and not $open_square_bracket
332 1223 567 61 $sym and $sym eq '['
333 1223 617 11 $sym and $sym eq '{'
358 4600 1107 69 $nword_op and $nword_op eq '-'
5707 0 69 $nword_op and $nword_op eq '-' and $rs > 0
1107 13 56 $nword_op and $nword_op eq '-' and $rs > 0 and substr($exp, $rs - 1, 1) ne ' '
13 8 48 $nword_op and $nword_op eq '-' and $rs > 0 and substr($exp, $rs - 1, 1) ne ' ' and not substr($exp, 0, $rs) =~ /\b\d+$/
360 4848 5 79 $rc eq '(' and $level++ == 0
361 4867 1 64 $rc eq '[' and $sq_level++ == 0
362 4913 1 18 $rc eq '{' and $hsh_level++ == 0
364 4848 5 79 $rc eq ')' and --$level == 0
4853 2 77 $rc eq ')' and --$level == 0 and $sq_level == 0
7 5 72 $rc eq ')' and --$level == 0 and $sq_level == 0 and $hsh_level == 0
370 238 139 4555 $level == 0 || $rc eq '(' && $level == 1 and $sq_level == 0
144 93 4462 $level == 0 || $rc eq '(' && $level == 1 and $sq_level == 0 and $hsh_level == 0
382 5350 2 376 $rc eq q['] and not $dquot
383 5411 27 290 $rc eq '"' and not $squot
389 1584 22 172 $tokens[$_]->isa('WWW::Shopify::Liquid::Token::Number') and $tokens[$_ - 1]->isa('WWW::Shopify::Liquid::Token::Operator')
1606 167 5 $tokens[$_]->isa('WWW::Shopify::Liquid::Token::Number') and $tokens[$_ - 1]->isa('WWW::Shopify::Liquid::Token::Operator') and $tokens[$_ - 1]{'core'} eq '-'
398 101 521 573 $_ == 2 || !$tokens[$_ - 3]->isa('WWW::Shopify::Liquid::Token::Operator') || $tokens[$_ - 3]{'core'} ne '|' and $tokens[$_ - 2]->isa('WWW::Shopify::Liquid::Token::Variable')
622 165 408 $_ == 2 || !$tokens[$_ - 3]->isa('WWW::Shopify::Liquid::Token::Operator') || $tokens[$_ - 3]{'core'} ne '|' and $tokens[$_ - 2]->isa('WWW::Shopify::Liquid::Token::Variable') and int @{$tokens[$_ - 2]{'core'};} == 1
686 0 408 $_ == 2 || !$tokens[$_ - 3]->isa('WWW::Shopify::Liquid::Token::Operator') || $tokens[$_ - 3]{'core'} ne '|' and $tokens[$_ - 2]->isa('WWW::Shopify::Liquid::Token::Variable') and int @{$tokens[$_ - 2]{'core'};} == 1 and $tokens[$_ - 2]{'core'}[0]->isa('WWW::Shopify::Liquid::Token::String')
165 388 20 $_ == 2 || !$tokens[$_ - 3]->isa('WWW::Shopify::Liquid::Token::Operator') || $tokens[$_ - 3]{'core'} ne '|' and $tokens[$_ - 2]->isa('WWW::Shopify::Liquid::Token::Variable') and int @{$tokens[$_ - 2]{'core'};} == 1 and $tokens[$_ - 2]{'core'}[0]->isa('WWW::Shopify::Liquid::Token::String') and $tokens[$_ - 1]->isa('WWW::Shopify::Liquid::Token::Separator')
388 2 18 $_ == 2 || !$tokens[$_ - 3]->isa('WWW::Shopify::Liquid::Token::Operator') || $tokens[$_ - 3]{'core'} ne '|' and $tokens[$_ - 2]->isa('WWW::Shopify::Liquid::Token::Variable') and int @{$tokens[$_ - 2]{'core'};} == 1 and $tokens[$_ - 2]{'core'}[0]->isa('WWW::Shopify::Liquid::Token::String') and $tokens[$_ - 1]->isa('WWW::Shopify::Liquid::Token::Separator') and $tokens[$_ - 1]{'core'} eq ':'
449 361 934 23 int @tokens > 0 and $tokens[-1]{'strip_right'}
464 328 297 1318 not $open_single_quote || $open_double_quote and $end_output_tag || $end_control_tag
486 305 2 318 $single_quote and not $open_double_quote
487 350 27 248 $double_quote and not $open_single_quote
516 1 346 14 int @tokens > 0 and $tokens[-1]{'strip_right'}

or 3 conditions

line l !l&&r !l&&!r condition
167 0 0 6 not $members[$_]->isa('WWW::Shopify::Liquid::Token::Separator') or $members[$_]{'core'} ne ','
205 0 0 6 !$members[$_]->isa('WWW::Shopify::Liquid::Token::Separator') || $members[$_]{'core'} ne ','
0 0 14 !$members[$_]->isa('WWW::Shopify::Liquid::Token::Separator') || $members[$_]{'core'} ne ':'
231 0 372 425 not defined $_[2] or $_[2] =~ /^\s*$/
279 160 125 1752 $token =~ /^'(.*)'$/s or $token =~ /^"(.*)"$/s
289 0 11 1465 $token eq '' or $token eq 'null'
290 121 64 1280 $token eq ':' or $token eq ','
185 0 1280 $token eq ':' or $token eq ',' or $token eq '.'
302 0 0 1863 $squot or $dquot
305 22 1223 56 $sym eq '.' || $sym eq ']' || $sym eq '[' || $sym eq '{' || $sym eq '}' || !$sym
310 1223 403 117 not $sym or $sym eq '.'
1626 51 66 not $sym or $sym eq '.' or $sym eq '['
346 0 423 1035 not defined $exp or $exp eq ''
359 532 264 4932 $squot or $dquot
370 4615 301 16 $level == 0 || $rc eq '(' && $level == 1
372 72 3232 1158 $rc eq '(' or defined $whitespace
3304 726 432 $rc eq '(' or defined $whitespace or $nword_op
389 0 3 2 $_ == 1 or $tokens[$_ - 2]->isa('WWW::Shopify::Liquid::Token::Separator')
3 0 2 $_ == 1 or $tokens[$_ - 2]->isa('WWW::Shopify::Liquid::Token::Separator') or $tokens[$_ - 2]->isa('WWW::Shopify::Liquid::Token::Operator')
398 976 118 101 $_ == 2 || !$tokens[$_ - 3]->isa('WWW::Shopify::Liquid::Token::Operator') || $tokens[$_ - 3]{'core'} ne '|'
447 952 366 0 $start_control_tag || $start_output_tag
464 200 128 1615 $open_single_quote || $open_double_quote
367 951 297 $end_output_tag || $end_control_tag
465 951 367 0 $end_control_tag || $end_output_tag
525 506 0 1 &blessed($token) or &looks_like_number($token)
550 27 37 439 $_ eq ':' || $_ eq ','
560 54 0 97 not $token->{'arguments'} or int @{$token->{'arguments'};} == 0