PPI::Token::Data(3)

πŸ’– PPI::Token::Data πŸ’–

okay bestie, so this is the PPI::Token::Data page from the User Contributed Perl Documentation β€” it's a Perl module manual (section 3 of the manual, iykyk) and it's all about the actual data hanging out in the __DATA__ section of a file. let's get into it πŸ¦‹


✨ NAME ✨

PPI::Token::Data β€” the actual data in the __DATA__ section of a file, no cap πŸ’…


🌸 INHERITANCE 🌸

the family tree goes like this, and yes it's giving royal lineage πŸ‘‘

PPI::Token::Data
isa PPI::Token
    isa PPI::Element

so it's a PPI::Token, which is a PPI::Element. iconic behaviour fr fr πŸ’œ


πŸŽ€ DESCRIPTION πŸŽ€

so the PPI::Token::Data class is the whole vibe for representing the actual data that lives inside a file's __DATA__ section. literally its whole job πŸ’–

and here's the cute part β€” one PPI::Token::Data object is used to represent the entire chunk of that data. why? primarily so it can hand you a convenient handle that points directly at the data. like, no scrolling, no slicing, just straight to it. obsessed ✨


πŸ’… METHODS πŸ’…

PPI::Token::Data gives you one method on top of everything you already get from its parent classes, PPI::Token and PPI::Element. just the one. but she serves 🫢

handle 🌈

the handle method returns an IO::String handle, and that handle lets you do all the normal handle-y things to the contents of the __DATA__ section of the file. all of them. every single one 😌

and unlike in perl itself, this means you can also do stuff like print brand new data onto the end of the __DATA__ section β€” yes, appending, we love to see it πŸ”₯ β€” or modify it with any other process that can accept an IO::Handle as input or output. flexible much? πŸ’€

returns an IO::String object. that's the return type, bestie, don't forget it πŸ“Œ

🫢 SUPPORT 🫢

see the support section in the main module. that's it, that's the section β€” go check the main module for the deets πŸ‘‘


πŸ‘‘ AUTHOR πŸ‘‘

Adam Kennedy <adamk@cpan.org> β€” thank you for your service, king πŸŽ€


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. read it, bestie, it's good for you πŸ“


and that's the whole page!! πŸ¦‹ this was PPI::Token::Data, documented as part of perl v5.42.0, dated 2026-01-17 β€” stay hydrated, stay tokenized, and go touch some __DATA__ βœ¨πŸ’–πŸŽ€

πŸ“¦ where this page comes from