Cataly...::Regex(3pm)

πŸ“¦
version 5.90035 Β· 2 versions
  • 5.90035 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 5.90035 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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::Intro for how they affect application authors πŸ‘‘
  • Catalyst::DispatchType for 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 🫢


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