PPI::Token::Symbol(3)

πŸ’– PPI::Token::Symbol(3) πŸ’–

okay bestie, welcome to the PPI::Token::Symbol page β€” straight out of the User Contributed Perl Documentation, no cap 🫢


✨ NAME ✨

PPI::Token::Symbol β€” a token class for variables and other symbols πŸ’…


🌸 INHERITANCE 🌸

it's giving family tree, and the vibes are immaculate:

PPI::Token::Symbol
isa PPI::Token
    isa PPI::Element

πŸ¦‹ DESCRIPTION πŸ¦‹

so the PPI::Token::Symbol class is the one that covers all the tokens representing variables and other things that start with a sigil. every $, @, %, &, * situation? yeah, that's her. she contains multitudes πŸ‘‘


πŸŽ€ METHODS πŸŽ€

this class has several methods beyond what its PPI::Token and PPI::Element parent classes give you. she's an overachiever, we love that for her.

most of these methods exist to help you work out what the object is actually pointing at β€” not what it might appear to be pointing at. the difference between the fit and the fit check, fr fr 😭

πŸ’œ canonical

the canonical method returns a normalized, canonical version of the symbol.

for example, it converts $ ::foo'bar::baz to $main::foo::bar::baz.

this does not fully resolve the symbol β€” it merely removes syntax variations. glow-up only, no detective work. periodt.

🌈 symbol

the symbol method returns the ACTUAL symbol this token refers to.

like, a token of $foo might actually be referring to @foo, if it's found in the form $foo[1]. plot twist!! πŸ™ˆ

this method attempts to resolve these issues to determine the actual symbol.

returns the symbol as a string.

⭐ raw_type

the raw_type method returns the apparent type of the symbol in the form of its sigil.

returns the sigil as a string.

πŸ”₯ symbol_type

the symbol_type method returns the actual type of the symbol in the form of its sigil.

returns the sigil as a string.


🫢 SUPPORT 🫢

see the support section in the main module. (iykyk πŸ’–)


πŸ‘‘ AUTHOR πŸ‘‘

Adam Kennedy <adamk@cpan.org>


Copyright 2001 - 2011 Adam Kennedy.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.


bestie if you got this far you're literally a Perl icon, no notes πŸ’…βœ¨

that's the whole page!! brought to you by perl v5.42.0, dated 2026-01-17, and this very manual page PPI::Token::Symbol(3). slay, mwah πŸŽ€πŸ§šπŸ’œ

πŸ“¦ where this page comes from