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 8 5 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 55632 unless ($t->{'line'} =~ /\G((?!\d)\w+(?:(?:\'|::)\w+)*(?:::)?)/cg)
208 260 44 if ($word =~ /^(\w+)'/ and $PPI::Token::Word::KEYWORDS{$1})
216 1062 54570 if (__current_token_is_attribute($t))
219 0 1062 $t->{'line_cursor'} >= $t->{'line_length'} ? :
223 8 54562 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 54556 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 1291 53265 if ($word =~ /\:/) { }
6625 46640 elsif ($PPI::Token::Word::KEYWORDS{$word} and $t->__current_token_is_forced_word) { }
2688 43952 elsif ($PPI::Token::Word::QUOTELIKE{$word}) { }
1576 42376 elsif ($PPI::Token::Word::OPERATOR{$word} and $word ne 'x' || $t->_current_x_is_operator) { }
284 0 2688 $t->{'line_cursor'} >= $t->{'line_length'} ? :
296 1319 41057 if ($t->{'line'} =~ /\G(\s*:)(?!:)/cg) { }
438 40619 elsif ($word eq '_') { }
297 621 698 if ($tokens[0] and $tokens[0]{'content'} eq 'sub') { }
405 293 elsif (not $tokens[0] && $tokens[0]->isa('PPI::Token::Operator')) { }
324 0 51868 if ($t->{'line_cursor'} >= $t->{'line_length'})