Egg::Plugin::Dispatch::Fast - High-speed Dispatch for Egg Plugin.
use Egg qw/ Dispatch::Fast /; __PACKAGE__->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 { ... }, );
It is a plugin to do Dispatch that is more high-speed than Egg::Plugin::Dispatch::Standard of the Egg standard.
HASH of dispatch_map can recognize only a single hierarchy.
Moreover, the regular expression etc. cannot be used for the key.
The content of the key should be CODE reference.
The argument passed for the CODE reference is similar to Egg::Plugin::Dispatch::Standard.
Egg::Plugin::Dispatch has been succeeded to. Please refer for that method of the handler.
The handler object of E::P::Dispatch::Fast is returned.
Egg::Plugin::Dispatch::handler has been succeeded to. Please refer for that method of the handler.
Constructor who returns E::P::Dispatch::Fast::handler object.
The mode that matches to dispatch_map is actually returned.
* The value of 'default_mode' method is returned when failing in the match.
Egg::Plugin::Dispatch, Egg::Release,
Masatoshi Mizuno <lushe@cpan.org>
Copyright (C) 2007 by Bee Flag, Corp. <http://egg.bomcity.com/>, All Rights Reserved.
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.