AnyEvent-HTTPD-Router
view release on metacpan or search on metacpan
t/01_simple_routes.t view on Meta::CPAN
#!perl
use lib 't/lib';
use common::sense;
use Test::More;
use AnyEvent::HTTPD::Router;
use MockedRequest;
sub make_route_param {
my $method = shift;
my $url = shift;
my $cb = sub {
t/02_variables.t view on Meta::CPAN
#!perl
use lib 't/lib';
use common::sense;
use Test::More;
use AnyEvent::HTTPD::Router;
use MockedRequest;
my %param_expectation;
sub make_route_param {
my $method = shift;
t/03_star_routes.t view on Meta::CPAN
#!perl
use lib 't/lib';
use common::sense;
use Test::More;
use AnyEvent::HTTPD::Router;
use MockedRequest;
my %param_expectation;
sub make_route_param {
my $method = shift;
t/04_not_found.t view on Meta::CPAN
#!perl
use lib 't/lib';
use Test::More;
use common::sense;
use AnyEvent::HTTP qw/http_request/;
use AnyEvent::HTTPD::Router;
my $h = AnyEvent::HTTPD::Router->new();
$h->reg_routes(
GET => '/foo' => sub {
my ( $httpd, $req ) = @_;
$req->respond( [ 200, 'ok', {}, 'GET OK' ] );
t/05_reg_routes_syntax.t view on Meta::CPAN
#!perl
use lib 't/lib';
use common::sense;
use Test::More;
use Test::Exception;
use AnyEvent::HTTPD::Router;
use MockedRequest;
sub make_route_param {
my $method = shift;
t/06_allowed_methods.t view on Meta::CPAN
#!perl
use lib 't/lib';
use common::sense;
use Test::More;
use AnyEvent::HTTPD::Router;
my $httpd = AnyEvent::HTTPD::Router->new();
is_deeply $httpd->allowed_methods, [qw(GET HEAD POST)], 'initial default routes';
$httpd->{allowed_methods} = [];
( run in 1.427 second using v1.01-cache-2.11-cpan-87723dcf8b7 )