1PPIx::QuoteLike::Token(U3s)er Contributed Perl DocumentatPiPoInx::QuoteLike::Token(3)
2
3
4

NAME

6       PPIx::QuoteLike::Token - Represent any token.
7

SYNOPSIS

9       This is an abstract class, and should not be instantiated by the user.
10

DESCRIPTION

12       This Perl module represents the base of the token hierarchy.
13

INHERITANCE

15       "PPIx::QuoteLike::Token" is not descended from any other class.
16
17       "PPIx::QuoteLike::Token" is the parent of
18       PPIx::QuoteLike::Token::Control, PPIx::QuoteLike::Token::Interpolation,
19       PPIx::QuoteLike::Token::String, PPIx::QuoteLike::Token::Structure,
20       PPIx::QuoteLike::Token::Unknown and PPIx::QuoteLike::Token::Whitespace.
21

METHODS

23       This class supports the following public methods:
24
25   content
26        say $token->content();
27
28       This method returns the text that makes up the token.
29
30   error
31        say $token->error();
32
33       This method returns the error text. This will be "undef" unless the
34       token actually represents an error.
35
36   parent
37        my $parent = $token->parent();
38
39       This method returns the token's parent, which will be the
40       PPIx::QuoteLike object that contains it.
41
42   next_sibling
43        my $next = $token->next_sibling();
44
45       This method returns the token after the invocant, or nothing if there
46       is none.
47
48   perl_version_introduced
49       This method returns the version of Perl in which the element was
50       introduced. This will be at least 5.000. Before 5.006 I am relying on
51       the perldelta, perlre, and perlop documentation, since I have been
52       unable to build earlier Perls. Since I have found no documentation
53       before 5.003, I assume that anything found in 5.003 is also in 5.000.
54
55       Since this all depends on my ability to read and understand masses of
56       documentation, the results of this method should be viewed with
57       caution, if not downright skepticism.
58
59       There are also cases which are ambiguous in various ways. For those see
60       "RESTRICTIONS" in PPIx::Regexp, and especially "Changes in Syntax" in
61       PPIx::Regexp.
62
63   perl_version_removed
64       This method returns the version of Perl in which the element was
65       removed. If the element is still valid the return is "undef".
66
67       All the caveats to perl_version_introduced() apply here also, though
68       perhaps less severely since although many features have been introduced
69       since 5.0, few have been removed.
70
71   previous_sibling
72        my $prev = $token->previous_sibling();
73
74       This method returns the token before the invocant, or nothing if there
75       is none.
76
77   significant
78        $token->significant()
79            and say 'significant';
80
81       This Boolean method returns a true value if the token is significant,
82       and a false one otherwise.
83
84   snext_sibling
85        my $next = $token->snext_sibling();
86
87       This method returns the significant token after the invocant, or
88       nothing if there is none.
89
90   sprevious_sibling
91        my $prev = $token->sprevious_sibling();
92
93       This method returns the significant token before the invocant, or
94       nothing if there is none.
95

SEE ALSO

97       PPIx::QuoteLike.
98

SUPPORT

100       Support is by the author. Please file bug reports at
101       <http://rt.cpan.org>, or in electronic mail to the author.
102

AUTHOR

104       Thomas R. Wyant, III wyant at cpan dot org
105
107       Copyright (C) 2016-2019 by Thomas R. Wyant, III
108
109       This program is free software; you can redistribute it and/or modify it
110       under the same terms as Perl 5.10.0. For more details, see the full
111       text of the licenses in the directory LICENSES.
112
113       This program is distributed in the hope that it will be useful, but
114       without any warranty; without even the implied warranty of
115       merchantability or fitness for a particular purpose.
116
117
118
119perl v5.30.0                      2019-08-19         PPIx::QuoteLike::Token(3)
Impressum