Plack::App::Cascade - Cascadable compound application
# 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;
Plack::App::Cascade is a Plack middleware component that compounds several apps and tries them to return the first response that is not 404.
$app = Plack::App::Cascade->new(apps => [ $app1, $app2 ]);
Creates a new Cascade application.
Appends a new application to the list of apps to try. You can pass the multiple apps to the one add call.
$app->catch([ 403, 404 ]);
Sets which error codes to catch and process onwards. Defaults to 404.
To install Plack, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.