Labyrinth::PSGI - PSGI handler for Labyrinth
Allow Labyrinth to run under Plack. Use the PSGI protocol to interface with a Plack web server to process web requests.
Update your settings file to include the following lines.
query-parser=PSGI writer-render=PSGI
Then create a .psgi file for your application, containing the following:
use Labyrinth::PSGI; my $app = sub { my $env = shift; my $lab = Labyrinth::PSGI->new( $env, '/var/www/<mywebsite>/cgi-bin/config/settings.ini' ); return $lab->run(); };
You may also need to add builder instructions. These should be added to your .psgi file, and may look something like:
use Plack::Builder; builder { enable "Static", path => qr!^/images/!, root => '../html'; enable "Static", path => qr!^/(cs|j)s/!, root => '../html'; enable "Static", path => qr!^/favicon.ico!, root => '../html'; enable "Static", path => qr!^/robots.txt!, root => '../html'; $app; };
The above lines allow static files to pass through and be retrieved from the file system, rather than through your application.
The constructor. Must be passed the environment variable from the PSGI server. You may optionally pass the Labyrinth configuration file as well, or via the run() method.
CGI::PSGI, Labyrinth
Barbie, <barbie@missbarbell.co.uk> for Miss Barbell Productions, http://www.missbarbell.co.uk/
Copyright (C) 2013-2014 Barbie for Miss Barbell Productions All Rights Reserved. This module is free software; you can redistribute it and/or modify it under the Artistic License 2.0.
To install Labyrinth::PSGI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Labyrinth::PSGI
CPAN shell
perl -MCPAN -e shell install Labyrinth::PSGI
For more information on module installation, please visit the detailed CPAN module installation guide.