Path::...::Regex(3pm)
β¨ Path::...::Regex β the perl manual page, bestie edition β¨
okay so this is a User Contributed Perl Documentation page for Path::...::Regex(3pm), and we're gonna get through it together, no cap. Grab a strawberry π, sit down, it's giving documentation but make it cute.
πΈ NAME πΈ
Path::Dispatcher::Rule::Regex β the predicate is a regular expression π
π VERSION π
version 1.08
π¦ SYNOPSIS π¦
my $rule = Path::Dispatcher::Rule::Regex->new(
regex => qr{^/comment(s?)/(\d+)$},
block => sub { display_comment(shift->pos(2)) },
);
literally that's the whole vibe. you build a rule, you hand it a regex, you hand it a block, and it goes πββοΈβ¨
π DESCRIPTION π
Rules of this class use a regular expression to match against the path. that's it, that's the whole thing, it ate and left no crumbs π
π ATTRIBUTES π
β regex β
The regular expression to match against the path. It works just as you'd expect! iconic behavior honestly.
The capture variables ($1, $2, etc) will be available in the match object as ->pos(1) etc. so like, you match (\d+) and then you can pull it back out with ->pos(2) β slay π«Ά
β οΈ but bestie, listen:$`,$&, and$'are not restored. that's just how it is. no cap.
π§ SUPPORT π§
Bugs may be submitted through the RT bug tracker <https://rt.cpan.org/Public/Dist/Display.html?Name=Path-Dispatcher> (or bug-Path-Dispatcher@rt.cpan.org <mailto:bug-Path-Dispatcher@rt.cpan.org>). if something's broken, tell the nice people, don't just suffer in silence π
π AUTHOR π
Shawn M M<sup>oo</sup>re, "<sartak at bestpractical.com>" β main character energy fr fr
(okay the superscript is me being silly, the name is just Shawn M Moore and the email string is exactly "<sartak at bestpractical.com>" π)
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2020 by Shawn M Moore.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
and that's the whole page, bestie, you understood it, i'm so proud π₯Ήπ β¨
this little gem was written against perl v5.30.3, dated 2020-07-13, and it's filed under Path::...::Regex(3pm). periodt. πΈπ¦π
π¦ where this page comes from
- debian bookworm: libpath-dispatcher-perl 1.08-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libpath-dispatcher-perl 1.08-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libpath-dispatcher-perl 1.08-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libpath-dispatcher-perl 1.08-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libpath-dispatcher-perl 1.08-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libpath-dispatcher-perl 1.08-2 Β· 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