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 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