1PPI::Token::Attribute(3U)ser Contributed Perl DocumentatiPoPnI::Token::Attribute(3)
2
3
4

NAME

6       PPI::Token::Attribute - A token for a subroutine attribute
7

INHERITANCE

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

DESCRIPTION

14       In Perl, attributes are a relatively recent addition to the language.
15
16       Given the code " sub foo : bar(something) {} ", the "bar(something)"
17       part is the attribute.
18
19       A "PPI::Token::Attribute" token represents the entire of the attribute,
20       as the braces and its contents are not parsed into the tree, and are
21       treated by Perl (and thus by us) as a single string.
22

METHODS

24       This class provides some additional methods beyond those provided by
25       its PPI::Token and PPI::Element parent classes.
26
27       Got any ideas for methods? Submit a report to rt.cpan.org!
28
29   identifier
30       The "identifier" attribute returns the identifier part of the
31       attribute.
32
33       That is, for the attribute "foo(bar)", the "identifier" method would
34       return "foo".
35
36   parameters
37       The "parameters" method returns the parameter strong for the attribute.
38
39       That is, for the attribute "foo(bar)", the "parameters" method would
40       return "bar".
41
42       Returns the parameters as a string (including the null string '' for
43       the case of an attribute such as "foo()".
44
45       Returns "undef" if the attribute does not have parameters.
46

SUPPORT

48       See the support section in the main module.
49

AUTHOR

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