PPI::To...::Regexp(3)

✨ NAME ✨

PPI::Token::QuoteLike::Regexp β€” the regexp constructor quote-like operator, bestie πŸ’…

So like, the manpage itself is filed under PPI::To...::Regexp(3) in the User Contributed Perl Documentation section, iykyk. The actual class you're here for is the one above. ✨


🧬 INHERITANCE 🧬

The family tree is giving legacy, and we love her for it:

PPI::Token::QuoteLike::Regexp
isa PPI::Token::QuoteLike
    isa PPI::Token
        isa PPI::Element

Everything trickles down from the top, no cap. πŸ‘‘


🌸 DESCRIPTION 🌸

A PPI::Token::QuoteLike::Regexp object is literally just the quote-like operator you use to build anonymous Regexp objects. That's her whole job. Main character energy, tiny role. πŸŽ€

Here's the vibe:

# Create a Regexp object for a module filename
my $module = qr/\.pm$/;

See? qr/\.pm$/ β€” that's her. Slay. πŸ’–


πŸ’… METHODS πŸ’…

Okay so these are the methods this class brings to the group chat, on top of everything you already inherit from the parent classes PPI::Token::QuoteLike, PPI::Token and PPI::Element. Not a replacement, an addition. Obsessed. 🫢

πŸ” get_match_string

The get_match_string method hands you back the chunk of the string that's gonna get compiled into the match portion of the regexp. That's it, that's the whole thing. πŸ’œ

πŸ™ˆ get_substitute_string

The get_substitute_string method always returns undef. Always. Because the qr{} construction has no substitution string β€” there's nothing to substitute, babe. 😭

It only exists for orthogonality with PPI::Token::Regexp. So like, don't get your hopes up, she's just here for symmetry. πŸ¦‹

πŸŽ€ get_modifiers

The get_modifiers method returns the modifiers that are gonna get compiled into the regexp. The flags. The little letters. You know the ones. ⭐

🌈 get_delimiters

The get_delimiters method returns the delimiters of the string as an array. The first and only element is the delimiters of the string that's gonna be compiled into a match string. One element. Solo. Single and thriving. πŸ’…


πŸ†˜ SUPPORT πŸ†˜

Go peep the support section in the main module. That's where the help lives, bestie. πŸ‘‘


🧚 AUTHOR 🧚

Adam Kennedy <adamk@cpan.org> β€” the icon, the legend, the moment. 🫢


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.

Fr fr, read the LICENSE file, it's right there in the module. Don't skip it. πŸ™ˆ

And that's the whole page, gorgeous. This one's from perl v5.42.0, dated 2026-01-17, filed under PPI::To...::Regexp(3) in the User Contributed Perl Documentation section. Byeee, go write some qr// βœ¨πŸ’–πŸŒˆ

πŸ“¦ where this page comes from