1Path::Dispatcher::Rule:U:sMeertaCdoanttar(i3bpumt)ed PerPlatDho:c:uDmiesnptaattcihoenr::Rule::Metadata(3pm)
2
3
4
6 Path::Dispatcher::Rule::Metadata - match path's metadata
7
9 version 1.08
10
12 my $path = Path::Dispatcher::Path->new(
13 path => '/REST/Ticket'
14 metadata => {
15 http_method => 'POST',
16 },
17 );
18
19 my $rule = Path::Dispatcher::Rule::Metadata->new(
20 field => 'http_method',
21 matcher => Path::Dispatcher::Rule::Eq->new(string => 'POST'),
22 );
23
24 $rule->run($path);
25
27 Rules of this class match the metadata portion of a path.
28
30 field
31 The metadata field/key name.
32
33 matcher
34 A Path::Dispatcher::Rule object for matching against the value of the
35 field.
36
38 Bugs may be submitted through the RT bug tracker
39 <https://rt.cpan.org/Public/Dist/Display.html?Name=Path-Dispatcher> (or
40 bug-Path-Dispatcher@rt.cpan.org <mailto:bug-Path-
41 Dispatcher@rt.cpan.org>).
42
44 Shawn M Moore, "<sartak at bestpractical.com>"
45
47 This software is copyright (c) 2020 by Shawn M Moore.
48
49 This is free software; you can redistribute it and/or modify it under
50 the same terms as the Perl 5 programming language system itself.
51
52
53
54perl v5.36.0 2023-01-P2a0th::Dispatcher::Rule::Metadata(3pm)