Egg::Dispatch::Fast - Another dispatch class.
package MyApp::Dispatch; use base qw/ Egg::Dispatch::Fast /; Egg->dispatch_map( _default => { label=> 'index page.', action => sub { ... }, }, # When only the label is set, an empty CODE reference is set to action. # And, hooo.tt was set in the template. hooo => { label => 'hooo page.' }, hoge => { label => 'hoge page', action => sub { ... }, }, boo => sub { ... }, );
EggDispatch::Standard it is a plugin to do more high-speed Dispatch.
As for 'dispatch_map', only a single hierarchy is treatable.
The regular expression etc. cannot be used for the key.
The value to the key should be CODE reference.
The argument passed for the CODE reference is Egg::Dispatch::Standard. It is similar.
Egg::Dispatch has been succeeded to.
The Egg::Dispatch::Fast::handler object is returned.
my $d= $e->dispatch;
The action matched with 'dispatch_map' is returned as a mode.
* The value of 'default_mode' method is returned when failing in the match.
Egg::Release, Egg::Dispatch,
Masatoshi Mizuno <lushe@cpan.org>
Copyright (C) 2008 Bee Flag, Corp. <http://egg.bomcity.com/>.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
To install Egg::Release, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Egg::Release
CPAN shell
perl -MCPAN -e shell install Egg::Release
For more information on module installation, please visit the detailed CPAN module installation guide.