1PPI::Token::Word(3) User Contributed Perl Documentation PPI::Token::Word(3)
2
3
4
6 PPI::Token::Word - The generic "word" Token
7
9 PPI::Token::Word
10 isa PPI::Token
11 isa PPI::Element
12
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
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
42 - Add "function", "method" etc detector methods
43
45 See the support section in the main module.
46
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.28.0 2017-06-22 PPI::Token::Word(3)