1Path::Dispatcher::Rule:U:sDeirspCaotncthr(i3bpumt)ed PerPlatDho:c:uDmiesnptaattcihoenr::Rule::Dispatch(3pm)
2
3
4
6 Path::Dispatcher::Rule::Dispatch - redispatch
7
9 version 1.08
10
12 my $dispatcher = Path::Dispatcher->new(
13 rules => [
14 Path::Dispatcher::Rule::Tokens->new(
15 tokens => [ 'help' ],
16 block => sub { show_help },
17 ),
18 Path::Dispatcher::Rule::Tokens->new(
19 tokens => [ 'quit' ],
20 block => sub { exit },
21 ),
22 ],
23 );
24
25 my $rule = Path::Dispatcher::Rule::Dispatch->new(
26 dispatcher => $dispatcher,
27 );
28
29 $rule->run("help");
30
32 Rules of this class use another dispatcher to match the path.
33
35 dispatcher
36 A Path::Dispatcher object. Its matches will be returned by matching
37 this rule.
38
40 Bugs may be submitted through the RT bug tracker
41 <https://rt.cpan.org/Public/Dist/Display.html?Name=Path-Dispatcher> (or
42 bug-Path-Dispatcher@rt.cpan.org <mailto:bug-Path-
43 Dispatcher@rt.cpan.org>).
44
46 Shawn M Moore, "<sartak at bestpractical.com>"
47
49 This software is copyright (c) 2020 by Shawn M Moore.
50
51 This is free software; you can redistribute it and/or modify it under
52 the same terms as the Perl 5 programming language system itself.
53
54
55
56perl v5.36.0 2023-01-P2a0th::Dispatcher::Rule::Dispatch(3pm)