Condition Coverage

blib/lib/WWW/Shopify/Liquid/Lexer.pm
Criterion Covered Total %
condition 0 282 0.0


and 3 conditions

line !l l&&!r l&&r condition
54 0 0 0 defined $key and $key ne ''
55 0 0 0 $self->is_processed($key) and $action eq 'optimize'
57 0 0 0 &reftype($place) and &reftype($place) eq 'HASH'
0 0 0 &reftype($place) and &reftype($place) eq 'HASH' and exists $place->{$key}
0 0 0 &reftype($place) and &reftype($place) eq 'ARRAY'
0 0 0 &reftype($place) and &reftype($place) eq 'ARRAY' and &looks_like_number($key)
0 0 0 &reftype($place) and &reftype($place) eq 'ARRAY' and &looks_like_number($key) and defined $place->[$key]
0 0 0 $pipeline->make_method_calls and &blessed($place)
0 0 0 $pipeline->make_method_calls and &blessed($place) and $place->can($key)
133 0 0 0 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
165 0 0 0 $_ % 4 == 3 and !$members[$_]->isa('WWW::Shopify::Liquid::Token::Separator') || $members[$_]{'core'} ne ','
0 0 0 $_ % 4 == 1 and !$members[$_]->isa('WWW::Shopify::Liquid::Token::Separator') || $members[$_]{'core'} ne ':'
167 0 0 0 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 0 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
224 0 0 0 $package->is_enclosing and $package->inner_halt_lexing
263 0 0 0 $sym and $sym eq ']'
264 0 0 0 $sym and $sym eq '}'
265 0 0 0 $sym eq '.' || $sym eq ']' || $sym eq '[' || $sym eq '{' || $sym eq '}' || !$sym and $open_square_bracket == 0
0 0 0 $sym eq '.' || $sym eq ']' || $sym eq '[' || $sym eq '{' || $sym eq '}' || !$sym and $open_square_bracket == 0 and $open_curly_bracket == 0
268 0 0 0 defined $contents and not $contents =~ /^\s*$/
291 0 0 0 $sym ne '"' and $sym ne q[']
0 0 0 $sym ne '"' and $sym ne q['] and not $open_curly_bracket
0 0 0 $sym ne '"' and $sym ne q['] and not $open_curly_bracket and not $open_square_bracket
292 0 0 0 $sym and $sym eq '['
293 0 0 0 $sym and $sym eq '{'
318 0 0 0 $nword_op and $nword_op eq '-'
0 0 0 $nword_op and $nword_op eq '-' and $rs > 0
0 0 0 $nword_op and $nword_op eq '-' and $rs > 0 and substr($exp, $rs - 1, 1) ne ' '
0 0 0 $nword_op and $nword_op eq '-' and $rs > 0 and substr($exp, $rs - 1, 1) ne ' ' and not substr($exp, 0, $rs) =~ /\b\d+$/
320 0 0 0 $rc eq '(' and $level++ == 0
321 0 0 0 $rc eq '[' and $sq_level++ == 0
322 0 0 0 $rc eq '{' and $hsh_level++ == 0
324 0 0 0 $rc eq ')' and --$level == 0
0 0 0 $rc eq ')' and --$level == 0 and $sq_level == 0
330 0 0 0 $level == 0 and $sq_level == 0
0 0 0 $level == 0 and $sq_level == 0 and $hsh_level == 0
342 0 0 0 $rc eq q['] and not $dquot
343 0 0 0 $rc eq '"' and not $squot
349 0 0 0 $tokens[$_]->isa('WWW::Shopify::Liquid::Token::Number') and $tokens[$_ - 1]->isa('WWW::Shopify::Liquid::Token::Operator')
0 0 0 $tokens[$_]->isa('WWW::Shopify::Liquid::Token::Number') and $tokens[$_ - 1]->isa('WWW::Shopify::Liquid::Token::Operator') and $tokens[$_ - 1]{'core'} eq '-'
358 0 0 0 $_ == 2 || !$tokens[$_ - 3]->isa('WWW::Shopify::Liquid::Token::Operator') || $tokens[$_ - 3]{'core'} ne '|' and $tokens[$_ - 2]->isa('WWW::Shopify::Liquid::Token::Variable')
0 0 0 $_ == 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
0 0 0 $_ == 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')
0 0 0 $_ == 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')
0 0 0 $_ == 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 ':'
394 0 0 0 $double_quote || $single_quote and not $open_tag
0 0 0 $double_quote || $single_quote and not $open_tag and not $open_output_tag
408 0 0 0 not $open_double_quote and $single_quote
0 0 0 not $open_single_quote and $double_quote
417 0 0 0 $end_tag and not defined $open_tag
420 0 0 0 $end_output_tag and not defined $open_output_tag
439 0 0 0 $end_tag and $open_tag
0 0 0 $end_output_tag and $open_output_tag
457 0 0 0 $tag and not $lexing_halter
0 0 0 $tag and not $lexing_halter and exists $self->{'lexing_halters'}{$tag}
0 0 0 $tag and $lexing_halter
0 0 0 $tag and $lexing_halter and $tag eq 'end' . $lexing_halter
474 0 0 0 int @tokens > 1 and $tokens[-1]->isa('WWW::Shopify::Liquid::Token::Text')
0 0 0 int @tokens > 1 and $tokens[-1]->isa('WWW::Shopify::Liquid::Token::Text') and $tokens[-2]->isa('WWW::Shopify::Liquid::Token::Tag') || $tokens[-2]->isa('WWW::Shopify::Liquid::Token::Output')
0 0 0 int @tokens > 1 and $tokens[-1]->isa('WWW::Shopify::Liquid::Token::Text') and $tokens[-2]->isa('WWW::Shopify::Liquid::Token::Tag') || $tokens[-2]->isa('WWW::Shopify::Liquid::Token::Output') and $tokens[-2]{'strip_right'}
494 0 0 0 $tag and $start_tag_strip
0 0 0 $tag and $start_tag_strip and int @tokens > 1
0 0 0 $tag and $start_tag_strip and int @tokens > 1 and $tokens[-2]->isa('WWW::Shopify::Liquid::Token::Text')

or 3 conditions

line l !l&&r !l&&!r condition
133 0 0 0 not $members[$_]->isa('WWW::Shopify::Liquid::Token::Separator') or $members[$_]{'core'} ne ','
165 0 0 0 !$members[$_]->isa('WWW::Shopify::Liquid::Token::Separator') || $members[$_]{'core'} ne ','
0 0 0 !$members[$_]->isa('WWW::Shopify::Liquid::Token::Separator') || $members[$_]{'core'} ne ':'
191 0 0 0 not defined $_[2] or $_[2] =~ /^\s*$/
239 0 0 0 $token =~ /^'(.*)'$/s or $token =~ /^"(.*)"$/s
249 0 0 0 $token eq '' or $token eq 'null'
250 0 0 0 $token eq ':' or $token eq ','
262 0 0 0 $squot or $dquot
265 0 0 0 $sym eq '.' || $sym eq ']' || $sym eq '[' || $sym eq '{' || $sym eq '}' || !$sym
270 0 0 0 not $sym or $sym eq '.'
0 0 0 not $sym or $sym eq '.' or $sym eq '['
306 0 0 0 not defined $exp or $exp eq ''
319 0 0 0 $squot or $dquot
332 0 0 0 defined $whitespace or $nword_op
349 0 0 0 $_ == 1 or $tokens[$_ - 2]->isa('WWW::Shopify::Liquid::Token::Separator')
0 0 0 $_ == 1 or $tokens[$_ - 2]->isa('WWW::Shopify::Liquid::Token::Separator') or $tokens[$_ - 2]->isa('WWW::Shopify::Liquid::Token::Operator')
358 0 0 0 $tokens[$_]->isa('WWW::Shopify::Liquid::Token::Grouping') or $tokens[$_]->isa('WWW::Shopify::Liquid::Token::Variable')
0 0 0 $tokens[$_]->isa('WWW::Shopify::Liquid::Token::Grouping') or $tokens[$_]->isa('WWW::Shopify::Liquid::Token::Variable') or $tokens[$_]->isa('WWW::Shopify::Liquid::Token::Number')
0 0 0 $tokens[$_]->isa('WWW::Shopify::Liquid::Token::Grouping') or $tokens[$_]->isa('WWW::Shopify::Liquid::Token::Variable') or $tokens[$_]->isa('WWW::Shopify::Liquid::Token::Number') or $tokens[$_]->isa('WWW::Shopify::Liquid::Token::String')
0 0 0 $_ == 2 || !$tokens[$_ - 3]->isa('WWW::Shopify::Liquid::Token::Operator') || $tokens[$_ - 3]{'core'} ne '|'
394 0 0 0 $double_quote || $single_quote
399 0 0 0 $start_output_tag or $start_tag
0 0 0 $end_output_tag or $end_tag
400 0 0 0 $start_output_tag || $start_tag
403 0 0 0 $end_output_tag || $end_tag
407 0 0 0 $double_quote or $single_quote
415 0 0 0 $open_single_quote or $open_double_quote
474 0 0 0 $tokens[-2]->isa('WWW::Shopify::Liquid::Token::Tag') || $tokens[-2]->isa('WWW::Shopify::Liquid::Token::Output')
515 0 0 0 &blessed($token) or &looks_like_number($token)
537 0 0 0 $_ eq ':' || $_ eq ','
547 0 0 0 not $token->{'arguments'} or int @{$token->{'arguments'};} == 0