Plack::Util::Load - load PSGI application from class, file, or URL
use Plack::Util::Load; $app = load_app('app.psgi'); $app = load_app; $app = load_app(5000); $app = load_app(':5000'); $app = load_app('localhost:5000'); $app = load_app('http://localhost:5000/'); $app = load_app("http://example.org/"); $app = load_app('MyApp::PSGI');
This module exports the function load_app to load a PSGI application from file, class name, URL, or port number on localhost. The function will return a code reference or die. A typical use case is the application of unit tests.
load_app
The additional options verbose can be passed to log HTTP requests and errors:
verbose
$app = load_app( 'http://example.org/', verbose => 1 );
The default value for this option can be set with $Plack::Util::Load::VERBOSE.
$Plack::Util::Load::VERBOSE
Plack::Util, Plack::App::Proxy
Copyright Jakob Voss, 2015-
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Plack::Util::Load, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Plack::Util::Load
CPAN shell
perl -MCPAN -e shell install Plack::Util::Load
For more information on module installation, please visit the detailed CPAN module installation guide.