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 π
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
- fedora 44: perl-PPI 1.284-2.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms