MojoX::Model - Model base class
# Model package App::Model::Foo; use Mojo::Base 'MojoX::Model'; sub do { # Do something. } # Application $self->model('Foo')->do();
MojoX::Model is the base class for your Mojolicious models.
MojoX::Model inherits all attributes from Mojo::Base and implements the following new ones.
my $app = $model->app; $model = $model->app(Mojolicious->new);
A reference back to the application, usually a Mojolicious object.
Mojolicious, Mojolicious::Guides, http://mojolicio.us.
Andrey Khozov, avkhozov@googlemail.com.
avkhozov@googlemail.com
Copyright (C) 2015, Andrey Khozov.
This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.
To install Mojolicious::Plugin::Model, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Plugin::Model
CPAN shell
perl -MCPAN -e shell install Mojolicious::Plugin::Model
For more information on module installation, please visit the detailed CPAN module installation guide.