Compiler-Parser
view release on metacpan or search on metacpan
t/app/Plack/App/Cascade.t view on Meta::CPAN
411412413414415416417418419420421422423424425426427428429430431432433434435Plack::App::Cascade - Cascadable compound application
=head1 SYNOPSIS
use Plack::App::Cascade;
use Plack::App::URLMap;
use Plack::App::File;
# Serve static files from multiple search paths
my $cascade = Plack::App::Cascade->new;
$cascade->add( Plack::App::File->new(root => "/www/example.com/foo")->to_app );
$cascade->add( Plack::App::File->new(root => "/www/example.com/bar")->to_app );
my $app = Plack::App::URLMap->new;
$app->map("/static", $cascade);
$app->to_app;
=head1 DESCRIPTION
Plack::App::Cascade is a Plack middleware component that compounds
several apps and tries them to return the first response that is not
404.
=head1 METHODS
( run in 0.691 second using v1.01-cache-2.11-cpan-26ccb49234f )