PPIx::R...Literal(3)

πŸ’– PPIx::Regexp::Token::Literal β€” the manual page, but make it cute ✨

okay bestie, gather round 🫢 this is the page for PPIx::Regexp::Token::Literal(3), straight out of the User Contributed Perl Documentation corner of the internet. it's giving "small class, big feelings." let's get into it πŸ’…


✨ NAME ✨

PPIx::Regexp::Token::Literal β€” literally just here to represent a literal character. that's the whole job. iconic behavior tbh πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

use PPIx::Regexp::Dumper;
PPIx::Regexp::Dumper->new( 'qr{foo}smx' )
    ->print();

that's it, that's the whole vibe check. three lines and a dream 🌸


🌈 INHERITANCE 🌈

PPIx::Regexp::Token::Literal is a PPIx::Regexp::Token. so it's got that Token bloodline, yk? family tree goes up πŸ’œ

and PPIx::Regexp::Token::Literal has no descendants. it's a leaf node, it's the end of the line, no one inherits from it. main character with no understudies, we love that for her πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so like. this class represents a literal character. any literal character. no matter how specified. doesn't matter how you wrote it, bestie, she's clocking it and representing it. periodt πŸŽ€


🌸 METHODS 🌸

this class provides the following public methods, bestie. methods that aren't documented here? those are private, and "unsupported" in the sense that the author reserves the right to change or remove them without notice. so like. don't build your whole personality on them, fr fr 😭

⭐ is_matcher

this method returns a true value, because a literal matches itself. like, of course she does. self-love queen. she IS the match, she IS the moment ✨

⭐ ordinal

print 'The ordinal of ', $token->content(),
    ' is ', $token->ordinal(), "\n";

okay so this one returns the ordinal of the literal, if it can figure it out. it's analogous to the ord built-in. no cap 🫢

here's the tea though, and you're gonna want to sit down for this one:

  • it will not attempt to determine the ordinal of a unicode name (\N{...}) unless charnames has been loaded, and it supports the vianame() function. instead, it will return undef. πŸ’€
  • users of Perl 5.6.2 and older may be out of luck here. my condolences, bestie πŸ™ˆ
  • unicode code points (e.g. \N{U+abcd}) should work independently of charnames, and just return the value of abcd. slay πŸ’…
  • it will never attempt to return the ordinal of an octet (\C{...}) because β€” and I quote the author here β€” I don't understand the syntax. 😭 honestly? respect. knowing your limits is growth 🌱
ngl, that last one is the most relatable line in any manpage ever. we've all been there πŸ’œ

🫢 SUPPORT 🫢

support is by the author, bestie. so if something's busted, please file bug reports at:

<https://github.com/trwyant/perl-PPIx-Regexp/issues>

or slide into the author's electronic mail. don't be shy, that's what it's for πŸ’Œ


πŸ‘‘ AUTHOR πŸ‘‘

Thomas R. Wyant, III β€” harryfmudd at comcast dot net


Copyright (C) 2009-2023, 2025-2026 by Thomas R. Wyant, III

this program is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0. for more details, see the full text of the licenses in the directory LICENSES. πŸ“œ

this program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. yeah, no promises, bestie, it's a whole legal thing βš–οΈ


and that's the whole page!! πŸŽ‰ this was perl v5.42.2, dated 2026-06-15, and you were reading PPIx::R...Literal(3) the entire time πŸ¦‹ tysm for coming to my ted talk, go forth and match yourself some literals πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from