Cataly...::Regex(3pm)
π Catalyst::DispatchType::Regex β Regex DispatchType π
okay bestie, welcome to the manual page for Catalyst::DispatchType::Regex (that's the 3pm one, if you're keeping track π). Buckle up, because this one's got lore.
β¨ NAME β¨
Catalyst::DispatchType::Regex β the Regex DispatchType. that's it, that's the name, she's simple like that π
πΈ SYNOPSIS πΈ
lowkey there's no synopsis of her own here β she's just pointing you at her big sister:
See Catalyst::DispatchType.
π¦ DESCRIPTION π¦
Status: Deprecated. π bestie. she's deprecated. Regex dispatch types have been deprecated and removed from Catalyst core. it is recommend that you use Chained methods or other techniques instead β no cap, that's the official word. and as part of the refactoring, the dispatch priority of Regex vs Regexp vs LocalRegex vs LocalRegexp may have changed. priority is now influenced by when the dispatch type is first seen in your application. so like... order of appearance matters now. iconic but also chaotic π
When loaded, a warning about the deprecation will be printed to STDERR. and if that warning is giving too much main character energy for your logs, you can suppress it by setting the CATALYST_NOWARN_DEPRECATE environment variable to a true value. slay, silence is golden β¨
so what does she do, when she's not being deprecated? she's a dispatch type managing path-matching behaviour using regexes. the way that she matches paths with regexes... it's giving powerful. for more information on dispatch types, see:
Catalyst::Manual::Introfor how they affect application authors πCatalyst::DispatchTypefor implementation information π₯
π METHODS π
π $self->list($c)
Output a table of all regex actions, and their private equivalent. a little spreadsheet moment, but make it regex π
π $self->match( $c, $path )
Checks path against every compiled regex, and offers the action for any regex which matches a chance to match the request. If it succeeds, sets action, match and captures on $c->req and returns 1. If not, returns 0 without altering $c. she's polite like that β no touching $c if she's not vibing with the path π«Ά
π $self->register( $c, $action )
Registers one or more regex actions for an action object. Also registers them as literal paths. double duty, we love a multitasker π
Returns 1 if any regexps were registered.
π $self->register_regex($c, $re, $action)
Register an individual regex on the action. Usually called from the register method. so like, she's the inner-circle friend that register calls up π
π $self->uri_for_action($action, $captures)
returns a URI for this action if it can find a regex attributes that contains the correct number of () captures. Note that this may function incorrectly in the case of nested captures β if your regex does (...(..))..(..) you'll need to pass the first and third captures only. π« yeah. nested captures will absolutely trip her up. count your parens, bestie, count them carefully.
β AUTHORS β
Catalyst Contributors, see Catalyst.pm. the whole group chat showed up for this one π«Ά
π COPYRIGHT π
This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself. free as in freedom, free as in she's yours now β¨
ngl this whole page is basically a "she's retired but we still love her" moment. deprecated, removed from core, still here in the docs being iconic ππ
and that's the whole thing, babes! this page came to you from perl v5.34.0, dated 2022-06-09, and it's the Cataly...::Regex(3pm) manual β shortened name and all, because even the header was like "we're not typing all that" π stay regex-y, mwah πβ¨
π¦ where this page comes from
- debian bookworm: libcatalyst-dispatchtype-regex-perl 5.90035-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libcatalyst-dispatchtype-regex-perl 5.90035-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcatalyst-dispatchtype-regex-perl 5.90035-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatalyst-dispatchtype-regex-perl 5.90035-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatalyst-dispatchtype-regex-perl 5.90035-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