The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

Changes for version 1.03

  • Provisional support for arbitrary payloads, not just code blocks, as results See https://github.com/sartak/path-dispatcher/blob/master/t/200-payload.t Eventually blocks will be deprecated, but not for a while. Internally blocks are rewritten as payloads so if you're doing deep magic with PD you may be exposed to that implementation detail.

Documentation

A cookbook for Path::Dispatcher

Modules

flexible and extensible dispatch
a list of matches
the result of a successful rule match
path and some optional metadata
"has a list of rules"
predicate and codeblock
predicate is any subroutine
matches only the empty path
one of a list of strings must match
predicate is a string equality
match path's metadata
predicate is a regular expression
a sequence of rules
predicate is a list of tokens
rules under a predicate

Provides

in lib/Path/Dispatcher/Rule/Chain.pm