The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

CatalystX::PSGIApp - Get a psgi_app in a unified way across different Catalyst versions

VERSION

version 0.01

DESCRIPTION

Provides a psgi_app via ->psgi_app if it's available, or via Catalyst::Engine::PSGI if it's not

OVERVIEW

To use Catalyst with PSGI on Catalyst versions pre 5.9 requires the use of Catalyst::Engine::PSGI. Version 5.9 (and presumably above) of Catalyst have PSGI baked in, and provide a psgi_app method.

If your Catalyst app is being run on versions on both side of this divide - which is a weird use-case you probably shouldn't have - this module allows you a unified way of getting the PSGI app back.

WARNINGS

You'll need to use Catalyst::Engine::PSGI installed for this to work with older Catalysts, but it's not listed as a dependency.

If you need this module, your developers are using different Catalyst versions to develop against, which is pretty weird.

As per Catalyst::PSGI, Catalyst using the default .psgi file will add several default middlewares - as we use the app_psgi method explicitly, these will not be added. See Catalyst::PSGI for details.

SYNOPSIS

 use CatalystX::PSGIApp;
 my $app = CatalystX::PSGIApp->psgi_app( 'Your::App::Here' );

METHODS

psgi_app

Returns a PSGI app, either via <-psgi_app>> if your version of Catalyst supports it, or using Catalyst::Engine::PSGI.

AUTHOR

Peter Sergeant pete@clueball.com, while at http://www.net-a-porter.com|NET-A-PORTER.