NAME
PAGI::App::Cascade - Try apps in sequence until success
SYNOPSIS
use PAGI::App::Cascade;
my $app = PAGI::App::Cascade->new(
apps => [$static_app, $dynamic_app],
catch => [404, 405],
)->to_app;
DESCRIPTION
Cascade tries apps in order until one returns a status code not in the catch list. By default, 404 and 405 are caught, causing the next app to be tried.
OPTIONS
apps- Arrayref of apps to try in ordercatch- Arrayref of status codes to catch (default: [404, 405])
METHODS
add($app)
Add an app to the cascade.