NAME
HTTPx::Dispatcher - the uri dispatcher
SYNOPSIS
package Your::Dispatcher;
use HTTPx::Dispatcher;
connect ':controller/:action/:id';
package Your::Handler;
use HTTP::Engine;
use Your::Dispatcher;
use UNIVERSAL::require;
HTTP::Engine->new(
'config.yaml',
handle_request => sub {
my $c = shift;
my $rule = Your::Dispatcher->match($c->req->uri);
$rule->{controller}->use or die 'hoge';
my $action = $rule->{action};
$rule->{controller}->$action( $c->req );
}
);
DESCRIPTION
HTTPx::Dispatcher is URI Dispatcher.
AUTHOR
Tokuhiro Matsuno <tokuhirom@gmail.com>
SEE ALSO
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.