Amon2-Plugin-Web-Maintenance
view release on metacpan or search on metacpan
t/01_basic.t view on Meta::CPAN
sub dispatch {
my $c = shift;
if ( $c->request->path_info eq '/' ) {
return $c->create_response( 200, [], [] );
}
elsif ( $c->request->path_info eq '/user' ) {
return $c->create_response( 200, [], [] );
}
else {
return $c->create_response( 404, [], [] );
}
}
__PACKAGE__->load_plugins('Web::Maintenance');
}
my $app = MyApp::Web->to_app;
my $mech = Test::WWW::Mechanize::PSGI->new(
app => $app,
max_redirect => 0,
( run in 0.678 second using v1.01-cache-2.11-cpan-39bf76dae61 )