1PPI::Token::Word(3)   User Contributed Perl Documentation  PPI::Token::Word(3)
2
3
4

NAME

6       PPI::Token::Word - The generic "word" Token
7

INHERITANCE

9         PPI::Token::Word
10         isa PPI::Token
11             isa PPI::Element
12

DESCRIPTION

14       A "PPI::Token::Word" object is a PPI-specific representation of several
15       different types of word-like things, and is one of the most common
16       Token classes found in typical documents.
17
18       Specifically, it includes not only barewords, but also any other valid
19       Perl identifier including non-operator keywords and core functions, and
20       any include "::" separators inside it, as long as it fits the format of
21       a class, function, etc.
22

METHODS

24       There are no methods available for "PPI::Token::Word" beyond those
25       provided by its PPI::Token and PPI::Element parent classes.
26
27       We expect to add additional methods to help further resolve a Word as a
28       function, method, etc over time.  If you need such a thing right now,
29       look at Perl::Critic::Utils.
30
31   literal
32       Returns the value of the Word as a string.  This assumes (often
33       incorrectly) that the Word is a bareword and not a function, method,
34       keyword, etc.  This differs from "content" because "Foo'Bar" expands to
35       "Foo::Bar".
36
37   method_call
38       Answers whether this is the name of a method in a method call. Returns
39       true if yes, false if no, and nothing if unknown.
40

TO DO

42       - Add "function", "method" etc detector methods
43

SUPPORT

45       See the support section in the main module.
46

AUTHOR

48       Adam Kennedy <adamk@cpan.org>
49
51       Copyright 2001 - 2011 Adam Kennedy.
52
53       This program is free software; you can redistribute it and/or modify it
54       under the same terms as Perl itself.
55
56       The full text of the license can be found in the LICENSE file included
57       with this module.
58
59
60
61perl v5.34.0                      2022-02-02               PPI::Token::Word(3)
Impressum