PPI::Token::Magic(3)

πŸ’– PPI::Token::Magic πŸ’–

okay bestie, gather round, because today we're talking about PPI::Token::Magic β€” the little class that goes "yep, that's a magic variable" and it's from the User Contributed Perl Documentation corner of the universe, and honestly? it's giving ✨niche legend✨. no cap.


🌸 NAME 🌸

PPI::Token::Magic β€” tokens that represent magic variables πŸͺ„βœ¨

like. the tokens. for the magic variables. that's the whole vibe.


πŸ¦‹ INHERITANCE πŸ¦‹

the family tree, and yes she's got main character energy all the way up:

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

so she's a PPI::Token::Symbol, which is a PPI::Token, which is a PPI::Element. it's a whole lineage. iconic bloodline fr fr πŸ’…


✨ SYNOPSIS ✨

so when we say magic variables, we mean these. like, all of them. the whole roster. the entire squad:

# When we say magic variables, we mean these...
$1   $2   $3   $4   $5   $6   $7   $8   $9
$_   $&   $`   $'   $+   @+   %+   $*   $.    $/    $|
$\   $"   $;   $%   $=   $-   @-   %-   $)    $#
$~   $^   $:   $?   $!   %!   $@   $$   $<    $>
$(   $0   $[   $]   @_   @*   $}   $,   $#+   $#-
$^L  $^A  $^E  $^C  $^D  $^F  $^H
$^I  $^M  $^N  $^O  $^P  $^R  $^S
$^T  $^V  $^W  $^X  %^H

look at that lineup 😭 it's like a festival poster but every single act is a weird little sigil.


πŸŽ€ DESCRIPTION πŸŽ€

so PPI::Token::Magic is a sub-class of PPI::Token::Symbol, and what it does is identify the token as a "magic variable" β€” one of those strange and unusual variables that are connected to "things" behind the scenes. πŸ‘€

like, "things". in quotes. because nobody's gonna fully explain the things. the things are behind the scenes. that's where they live. that's their whole address. 🫢

some of these are extremely common, like $_ β€” you've met $_, everyone's met $_, $_ is basically your mutual on every single Perl file ever.

and others? bestie, you will quite probably never encounter them in your entire Perl career. πŸ’€ not once. not ever. they're out there, existing, being magic, and you'll never cross paths. and that's okay. let them cook. πŸ™ˆ


πŸ’… METHODS πŸ’…

the class provides no additional methods, beyond those provided by PPI::Token::Symbol, PPI::Token and PPI::Element.

that's it. that's the whole section. she inherited everything and added nothing. honestly? respect. minimal queen. πŸ‘‘


🌈 SUPPORT 🌈

see the support section in the main module. 🫑 (yes, that's the whole thing, go check the main module, it's got the goods)


πŸ‘‘ 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.

πŸ“œ okay so legally speaking: free software, same terms as Perl itself, and the full text lives in the LICENSE file that ships with the module. that's the whole legal tea. β˜•

and that's the page, bestie!! πŸŽ€ this was perl v5.42.0, dated 2026-01-17, and yes, we read the entire PPI::Token::Magic(3) manpage together and it was lowkey iconic. go forth and recognize a magic variable when you see one. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from