Condition Coverage

blib/lib/Language/P/Lexer.pm
Criterion Covered Total %
condition 70 157 44.5


and 3 conditions

line !l l&&!r l&&r condition
243 0 3008 1 $$self{'_start_of_line'} and $$buffer =~ s/^#[ \t]*line[ \t]+([0-9]+)(?:[ \t]+"([^"]+)")?[ \t]*[\r\n]//
251 1592 1416 0 $$buffer =~ s/^([ \t]+)// and defined wantarray
407 83 0 7 $c eq '(' and not $interpolated_pattern
0 54 29 not $interpolated_pattern and my $special = $pattern_special{$c}
453 1053 0 165 $c eq '\\' and $self->quote->{'interpolate'}
1024 0 29 $c =~ /^[\$\@]$/ and $self->quote->{'interpolate'}
468 29 0 0 $interpolated_pattern and !length($$buffer) || index("()| \r\n\t", substr($$buffer, 0, 1)) != -1
518 0 342 0 defined $$_ and $$_ =~ /^[ \t\r\n]/
527 342 0 0 $$_ =~ s/^::(?=\W)//x and do { $id = [$$self{'pos'}, 1, 'main::', 2] }
530 1 341 0 $$_ =~ s/^(\'|::)?(\w+)//x and do { if ($flags & 1) { return [$$self{'pos'}, 1, $2, 1]; } ; my $ids = defined $1 ? '::' . $2 : $2; my $idt = defined $1 ? 2 : 1; while ($$_ =~ s/^::(\w*)|^\'(\w+)//) { $ids .= '::' . (defined $1 ? $1 : $2); $idt = 2; } ; $id = [$$self{'pos'}, 1, $ids, $idt] }
545 1 0 0 $$_ =~ s/^{\^([A-Z\[\\\]^_?])(\w*)}//x and do { $id = [$$self{'pos'}, 1, chr(ord($1) - 65 + 1) . $2, 2] }
548 1 0 0 $$_ =~ s/^{//x and do { my $spcbef = _skip_space($self); my $maybe_id; if ($$_ =~ s/^(\w+)//x) { $maybe_id = $1; } else { $$_ = '{' . $spcbef . $$_; return undef; } ; my $spcaft = _skip_space($self); if ($$_ =~ s/^}//x) { $id = [$$self{'pos'}, 1, $maybe_id, 1]; } elsif ($$_ =~ /^\[|^\{/) { ++$$self{'brackets'}; push @{$$self{'pending_brackets'};}, $$self{'brackets'}; $id = [$$self{'pos'}, 1, $maybe_id, 1]; } else { $$_ = '{' . $spcbef . $maybe_id . $spcaft . $$_; return undef; } }
571 1 0 0 $$_ =~ /^\$[\${:]/ and do { return }
574 1 0 0 $$_ =~ s/^(\W)(?=\W)// and do { $id = [$$self{'pos'}, 1, $1, 2] }
578 1 312 29 $id and $self->quote
313 0 29 $id and $self->quote and $$self{'brackets'} == 0
663 0 171 0 $op and not $quote_start
687 1208 0 0 $paired and $c eq $quote_start
1037 0 0 $is_regex and $c eq '$' || $c eq '@'
0 0 0 $is_regex and $c eq '$' || $c eq '@' and $quote_start ne q[']
708 0 0 0 length $nc and $nc ne $quote_end
0 0 0 length $nc and $nc ne $quote_end and index("()| \r\n\t", $nc) == -1
750 0 0 0 length $$_ and (my $idx = index($fl_str, substr($$_, 0, 1))) >= 0
841 1863 0 0 $$_ =~ /^x[0-9]/ and $expect == 3
860 219 102 0 $no_space and $$_ =~ /^::/ || ($type == 1 || $type == 2) && $$_ =~ /^'\w/
873 219 54 48 $no_space and $type == 1
273 11 37 $no_space and $type == 1 and $$_ =~ /^\(/
881 78 0 243 $expect == 1 and $type != 2
78 236 7 $expect == 1 and $type != 2 and $$_ =~ s/^:(?!:)//
883 0 0 0 $type == 2 and $self->symbol_table->get_symbol($ids, '*')
894 308 6 0 $type == 1 and $ids =~ /^__/
906 2 0 0 $op == 65 and $expect != 3
916 1344 27 0 $$_ =~ /^
952 6 78 0 $brack eq '}' and @{$$self{'pending_brackets'};}
84 0 0 $brack eq '}' and @{$$self{'pending_brackets'};} and $$self{'pending_brackets'}[-1] == $$self{'brackets'}
963 11 70 3 $$self{'brackets'} == 0 and $self->quote
996 11 0 0 $$_ =~ /^,/ and $$next[1] != 1

or 2 conditions

line l !l condition
76 188 61 delete $$self{'string'} || ''
849 0 321 $1 || ''

or 3 conditions

line l !l&&r !l&&!r condition
406 91 0 1163 $pattern or $interpolated_pattern
468 0 0 0 !length($$buffer) || index("()| \r\n\t", substr($$buffer, 0, 1)) != -1
674 0 171 0 $quote_end{$quote_start} || $quote_start
687 0 0 0 $c eq '$' || $c eq '@'
690 0 0 164 $qc eq $quote_start or $qc eq $quote_end
736 0 0 171 $op eq 'qx' or $op eq '`'
738 0 0 0 $op eq 's' or $op eq 'tr'
0 0 0 $op eq 's' or $op eq 'tr' or $op eq 'y'
798 0 0 0 $self->_heredoc_lexer || $self
854 2 0 319 $op || $fqual
860 0 0 102 $$_ =~ /^::/ || ($type == 1 || $type == 2) && $$_ =~ /^'\w/
949 3 78 84 $brack eq '[' or $brack eq '{'
996 0 0 11 $$_ =~ /^=>/ or $$_ =~ /^,/ and $$next[1] != 1
1008 0 0 0 $expect == 2 or $expect == 1