Branch Coverage

blib/lib/PPI/Token/Word.pm
Criterion Covered Total %
branch 57 72 79.1


line true false branch
80 4 7 if ($previous and $previous->isa("PPI::Token::Operator") and $previous->content eq "->")
91 3 15 unless $snext
93 8 1 if ($snext->isa("PPI::Structure::List") or $snext->isa("PPI::Token::Structure") or $snext->isa("PPI::Token::Operator") and $snext->content eq ',' || $snext->content eq '=>')
108 1 5 if ($snext->isa("PPI::Token::Word") and $snext->content =~ / \w :: \z /msx)
126 9 4 if ($t->{'line'} =~ /\G(\w+(?:(?:\'|::)\w+)*(?:::)?)/cg)
131 0 0 if ($word =~ /^(\w+)'/ and $PPI::Token::Word::KEYWORDS{$1})
140 0 13 if (__current_token_is_attribute($t))
146 0 13 if ($PPI::Token::Word::KEYWORDS{$word})
148 0 0 if ($t->__current_token_is_forced_word)
154 0 0 if ($PPI::Token::Word::QUOTELIKE{$word})
160 0 0 if ($PPI::Token::Word::OPERATOR{$word})
168 5 8 if ($word =~ /\:/)
175 0 8 if ($char eq ':') { }
1 7 elsif ($word eq '_') { }
200 0 60995 unless ($t->{'line'} =~ /\G((?!\d)\w+(?:(?:\'|::)\w+)*(?:::)?)/cg)
208 261 59 if ($word =~ /^(\w+)'/ and $PPI::Token::Word::KEYWORDS{$1})
216 1065 59930 if (__current_token_is_attribute($t))
219 0 1065 $t->{'line_cursor'} >= $t->{'line_length'} ? :
223 8 59922 if ($word eq "__END__")
236 6 2 if ($end_rest =~ /\n$/) { }
238 1 5 if length $end_rest
241 1 1 if length $end_rest
249 6 59916 if ($word eq "__DATA__")
260 4 2 if ($data_rest =~ /\n$/) { }
262 1 3 if length $data_rest
265 1 1 if length $data_rest
273 1316 58600 if ($word =~ /\:/) { }
6629 51971 elsif ($PPI::Token::Word::KEYWORDS{$word} and $t->__current_token_is_forced_word) { }
2696 49275 elsif ($PPI::Token::Word::QUOTELIKE{$word}) { }
1648 47627 elsif ($PPI::Token::Word::OPERATOR{$word} and $word ne 'x' || $t->_current_x_is_operator) { }
284 0 2696 $t->{'line_cursor'} >= $t->{'line_length'} ? :
296 1367 46260 if ($t->{'line'} =~ /\G(\s*:)(?!:)/cg) { }
452 45808 elsif ($word eq '_') { }
297 624 743 if ($tokens[0] and $tokens[0]{'content'} eq 'sub') { }
448 295 elsif (not $tokens[0] && $tokens[0]->isa('PPI::Token::Operator')) { }
324 0 57220 if ($t->{'line_cursor'} >= $t->{'line_length'})