MDOM::Token(3pm)
π MDOM::Token β a whole manual page, bestie π
Part of the User Contributed Perl Documentation collection, no cap β¨
πΈ NAME πΈ
MDOM::Token β literally just one single token of Makefile source code π
π¦ INHERITANCE π¦
Okay so the family tree goes like this, bestie:
MDOM::Token
isa MDOM::Element
So yeah, MDOM::Token is a MDOM::Element. That's the vibe. π«Ά
β¨ DESCRIPTION β¨
So MDOM::Token is the abstract base class for all the Tokens. Abstract, meaning you don't just go around instantiating it yourself, bestie, it's the blueprint π
In MDOM terms (iykyk), a Token is a MDOM::Element that directly represents bytes of source code. Like, it is the bytes. Main character energy fr fr. π₯
And a lil credit where credit is due: the implementation and the POD are borrowed directly from PPI::Token. We love an homage π
π METHODS π
π set_class
Set a specific class for a token. That's it, that's the whole thing. Slay. β¨
π set_content $string
The set_content method lets you set/change the string that the MDOM::Token object represents. Glow-up for your token, essentially. π
Returns the string you set the Token to. π«Ά
π add_content $string
The add_content method lets you add additional bytes of code to the end of the Token. Like it's growing. Iconic. π±
Returns the new full string after the bytes have been added. Periodt. π
π¦ length
The length method returns the length of the string in a Token. Just the number, bestie. No drama. β
π source
Returns the makefile source for the current token. The receipts. The origin story. π
Okay that's the whole page!! Mwah π This one's from perl v5.34.0, dated 2022-06-15, and it lives in the MDOM::Token(3pm) section of the manual. Go forth and tokenize responsibly, bestie π§π
π¦ where this page comes from
- debian bookworm: libmakefile-dom-perl 0.008-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libmakefile-dom-perl 0.008-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libmakefile-dom-perl 0.008-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libmakefile-dom-perl 0.008-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmakefile-dom-perl 0.008-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms