-
-
11 May 2022 16:16:43 UTC
- Distribution: Kelp-Module-Raisin
- Module version: 1.01
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues
- Testers (256 / 3 / 1)
- Kwalitee
Bus factor: 1- 94.74% Coverage
- License: perl_5
- Perl: v5.10.0
- Activity
24 month- Tools
- Download (11.08KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- NAME
- SYNOPSIS
- DESCRIPTION
- MODULE INFORMATION
- METHODS INTRODUCED TO KELP
- CONFIGURATION
- SEE ALSO
- AUTHOR
- COPYRIGHT AND LICENSE
NAME
Kelp::Module::Raisin - Raisin integration with Kelp
SYNOPSIS
# in config - order matters modules => [qw(Symbiosis Raisin)], modules_init => { # optional Symbiosis => { mount => '/path', # will mount Kelp under /path }, # required Raisin => { mount => '/api', # will mount Raisin under /api class => 'My::Raisin', # required - full class name of Raisin app }, }, # in application's build method $self->raisin->add_route( method => 'GET', path => '/from-kelp', params => {}, code => sub { 'Hello World from Kelp, in Raisin!' }, ); # in psgi script $app = MyKelpApp->new; $app->run_all;
DESCRIPTION
This is a very straightforward module that integrates the Kelp framework with the Raisin API framework using Kelp::Module::Symbiosis. See the documentation for Kelp::Module::Symbiosis and Kelp::Module::Symbiosis::Base for a full reference on how this module behaves.
MODULE INFORMATION
This module name is 'raisin'. You can refer to it with that name in Symbiosis methods - loaded and mounted. There shouldn't be a need to, since it will be mounted automatically if you specify "mount" in configuration.
The module class itself does not expose anything particularly interesting, it is just a wrapper for Raisin.
METHODS INTRODUCED TO KELP
raisin
my $raisin = $kelp->raisin;
Returns the running instance of Raisin.
CONFIGURATION
middleware, middleware_init
Same as "middleware, middleware_init" in Kelp::Module::Symbiosis::Base. Since Raisin can wrap itself in its own middleware it will likely not be that useful.
mount
See "mount" in Kelp::Module::Symbiosis::Base for details.
class
Should be a full name of the package that defines an api using Raisin::API. Keep in mind that Raisin::API is really a singleton so it is not suitable for multiple app setup.
SEE ALSO
AUTHOR
Bartosz Jarzyna, <bbrtj.pro@gmail.com>
COPYRIGHT AND LICENSE
Copyright (C) 2020 - 2022 by Bartosz Jarzyna
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Module Install Instructions
To install Kelp::Module::Raisin, copy and paste the appropriate command in to your terminal.
cpanm Kelp::Module::Raisin
perl -MCPAN -e shell install Kelp::Module::Raisin
For more information on module installation, please visit the detailed CPAN module installation guide.