Mojolicious::Plugin::Mandel - A plugin for mango document model called Mandel.
version 0.1.1
Mojolicious::Lite application:
plugin Mandel => { a => { "Mandel::A" => "mongodb://localhost/test", "Mandel::B" => "mongodb://localhost/btest" }, };
a is the name of mandel that will be prefix of mandel documents, Mandel::A is the Mandel model name, the value mongodb://localhost/test is the MongoDB string URI.
a
Mandel::A
mongodb://localhost/test
Then you can call mandel, mandel_document in controller.
mandel
mandel_document
# / any '/' => sub { my $c = shift; my $coll = $c->mandel("a.document"); # or $coll = $c->mandel("document"); $c->render(text => $coll->name); };
Mojolicious::Plugin::Mandel is a Model (M in MVC architecture) for Mojolicious applications, based on the Mandel and Mango.
The plugin generate two helpers:
Param: require one argument which should be one of the mandel_documents.
mandel_documents
No params.
Return: an array of contained mandel document names.
Containing mandel document objects.
Containing the mandel document names.
The method to register plugin.
Huo Linhe <huolinhe@berrygenomics.com>
This software is copyright (c) 2015 by Berry Genomics.
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 Mojolicious::Plugin::Mandel, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Plugin::Mandel
CPAN shell
perl -MCPAN -e shell install Mojolicious::Plugin::Mandel
For more information on module installation, please visit the detailed CPAN module installation guide.