PPI::Token::Cast(3)
β¨ NAME β¨
PPI::Token::Cast β bestie, it's a prefix that forces a value into a different context π
πΈ INHERITANCE πΈ
Okay so the family tree goes like this, and she's got main character energy all the way up:
PPI::Token::Cast
isa PPI::Token
isa PPI::Element
π DESCRIPTION π
So a "cast" in PPI terms is one or more characters hanging out at the front of something, acting as a prefix that forces a value into a different class or context. Like, it's giving glow-up but for data types. β¨
This covers referencing, dereferencing, and a few other minor cases (iykyk, the little side quests).
For expressions like @$foo or "@{ $foo{bar} }", the @ in both of those cases is a cast. And in this specific situation? It's an array dereference. No cap. π«Ά
π METHODS π
There are literally no additional methods beyond the ones you already get from the parent PPI::Token and PPI::Element classes. She inherited everything, she invented nothing. Iconic behavior honestly. π
π¦ SUPPORT π¦
See the support section in the main module. (The main module is the mothership, go check her out. π)
π AUTHOR π
Adam Kennedy <adamk@cpan.org>
β COPYRIGHT β
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.
ok that's the whole page bestie, tysm for reading, love u, bye πβ¨
perl v5.42.0 Β· 2026-01-17 Β· PPI::Token::Cast(3) β periodt π
π¦ where this page comes from
- fedora 44: perl-PPI 1.284-2.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms