NAME
Mojolicious::Plugin::Mongol - Mongol plugin for Mojolicious
SYNOPSIS
sub
startup {
my
$self
=
shift
();
$self
->plugin(
'Mongol'
,
{
options
=> {},
entities
=> {
'My::Models::Person'
=>
'db.people'
,
'My::Models::Address'
=>
'db.addresses'
,
}
}
);
}
DESCRIPTION
Mongol plugin for Mojolicious.
HELPERS
mongodb
sub
action {
my
$self
=
shift
();
my
$mongo
=
$self
->mongodb();
...
return
$self
->render(
json
=>
undef
);
}
Just in case you need access to the MongoDB client instance you can use this helper to get it.
AUTHOR
Tudor Marghidanu <tudor@marghidanu.com>
SEE ALSO
LICENSE
This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.