1Path::Dispatcher::Rule:U:sReergeCxo(n3tprmi)buted Perl DPoactuhm:e:nDtiastpiaotncher::Rule::Regex(3pm)
2
3
4

NAME

6       Path::Dispatcher::Rule::Regex - predicate is a regular expression
7

VERSION

9       version 1.08
10

SYNOPSIS

12           my $rule = Path::Dispatcher::Rule::Regex->new(
13               regex => qr{^/comment(s?)/(\d+)$},
14               block => sub { display_comment(shift->pos(2)) },
15           );
16

DESCRIPTION

18       Rules of this class use a regular expression to match against the path.
19

ATTRIBUTES

21   regex
22       The regular expression to match against the path. It works just as
23       you'd expect!
24
25       The capture variables ($1, $2, etc) will be available in the match
26       object as "->pos(1)" etc. "$`", $&, and "$'" are not restored.
27

SUPPORT

29       Bugs may be submitted through the RT bug tracker
30       <https://rt.cpan.org/Public/Dist/Display.html?Name=Path-Dispatcher> (or
31       bug-Path-Dispatcher@rt.cpan.org <mailto:bug-Path-
32       Dispatcher@rt.cpan.org>).
33

AUTHOR

35       Shawn M Moore, "<sartak at bestpractical.com>"
36
38       This software is copyright (c) 2020 by Shawn M Moore.
39
40       This is free software; you can redistribute it and/or modify it under
41       the same terms as the Perl 5 programming language system itself.
42
43
44
45perl v5.38.0                      2023-07-21Path::Dispatcher::Rule::Regex(3pm)
Impressum