GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Plack::App::Cascade(3) User Contributed Perl Documentation Plack::App::Cascade(3)

Plack::App::Cascade - Cascadable compound application

  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;

Plack::App::Cascade is a Plack middleware component that compounds several apps and tries them to return the first response that is not 404.

new
  $app = Plack::App::Cascade->new(apps => [ $app1, $app2 ]);
    

Creates a new Cascade application.

add
  $app->add($app1);
  $app->add($app2, $app3);
    

Appends a new application to the list of apps to try. You can pass the multiple apps to the one "add" call.

catch
  $app->catch([ 403, 404 ]);
    

Sets which error codes to catch and process onwards. Defaults to 404.

Tatsuhiko Miyagawa

Plack::App::URLMap Rack::Cascade
2020-11-30 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.