1PPI::Token::Symbol(3) User Contributed Perl DocumentationPPI::Token::Symbol(3)
2
3
4
6 PPI::Token::Symbol - A token class for variables and other symbols
7
9 PPI::Token::Symbol
10 isa PPI::Token
11 isa PPI::Element
12
14 The "PPI::Token::Symbol" class is used to cover all tokens that repre‐
15 sent variables and other things that start with a sigil.
16
18 This class has several methods beyond what is provided by its
19 PPI::Token and PPI::Element parent classes.
20
21 Most methods are provided to help work out what the object is actually
22 pointing at, rather than what it might appear to be pointing at.
23
24 canonical
25
26 The "canonical" method returns a normalized, canonical version of the
27 symbol.
28
29 For example, it converts "$ ::foo'bar::baz" to $main::foo::bar::baz.
30
31 This does not fully resolve the symbol, but merely removes syntax vari‐
32 ations.
33
34 symbol
35
36 The "symbol" method returns the ACTUAL symbol this token refers to.
37
38 A token of $foo might actually be referring to @foo, if it is found in
39 the form $foo[1].
40
41 This method attempts to resolve these issues to determine the actual
42 symbol.
43
44 Returns the symbol as a string.
45
46 raw_type
47
48 The "raw_type" method returns the apparent type of the symbol in the
49 form of its sigil.
50
51 Returns the sigil as a string.
52
53 symbol_type
54
55 The "symbol_type" method returns the actual type of the symbol in the
56 form of its sigil.
57
58 Returns the sigil as a string.
59
61 See the support section in the main module.
62
64 Adam Kennedy <adamk@cpan.org>
65
67 Copyright 2001 - 2006 Adam Kennedy.
68
69 This program is free software; you can redistribute it and/or modify it
70 under the same terms as Perl itself.
71
72 The full text of the license can be found in the LICENSE file included
73 with this module.
74
75
76
77perl v5.8.8 2006-09-23 PPI::Token::Symbol(3)