RapidApp::Builder - Plack-compatable, runtime-generated RapidApp loader
use RapidApp::Builder; my $builder = RapidApp::Builder->new( debug => 1, appname => "My::App", plugins => [ ... ], config => { ... } ); # Plack app: $builder->to_app
This module is an extension to both Plack::Component and CatalystX::AppBuilder and facilitates programatically creating/instantiating a RapidApp application without having to setup/bootstrap files on disk. As a Plack::Component, it can also be used anywhere Plack is supported, and can subclassed in the same manner as any Plack::Component class.
...
Class name of the RapidApp/Catalyst app to be built.
Alternative to appname, but will append a number if the specified class already exists (loaded or unloaded, but found in @INC). For example, if set to MyApp, if MyApp already exists, the appname is set to <MyApp1>, if that exists it is set to MyApp2 and so on.
appname
MyApp
MyApp2
List of Catalyst plugins to load. The plugin 'RapidApp' is always loaded, and '-Debug' is loaded when debug is set.
debug
Optional list of components (i.e. Catalyst Models, Views and Controllers) to inject into the application. These should be specified as 2-value ArrayRefs with the class name to inject as the first argument, and the name to inject it as in the application (relative to the app namespace) as the second argument.
For example, to inject a controller named 'Blah':
inject_components => [ [ 'Some::Catalyst::Controller::Foo' => 'Controller::Blah' ] ]
Boolean flag to enable debug output in the application. When set, adds -Debug to the plugins list.
-Debug
The $VERSION string to use
$VERSION
Same as to_app
to_app
PSGI $app CodeRef. Derives from Plack::Component
$app
RapidApp
Henry Van Styn <vanstyn@cpan.org>
This software is copyright (c) 2015 by IntelliTree Solutions llc.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install RapidApp, copy and paste the appropriate command in to your terminal.
cpanm
cpanm RapidApp
CPAN shell
perl -MCPAN -e shell install RapidApp
For more information on module installation, please visit the detailed CPAN module installation guide.