Maypole::Model::CDBI::Plain - Class::DBI model without ::Loader
package Foo; use 'Maypole::Application'; Foo->config->model("Maypole::Model::CDBI::Plain"); Foo->setup([qw/ Foo::SomeTable Foo::Other::Table /]);
This module allows you to use Maypole with previously set-up Class::DBI classes; simply call setup with a list reference of the classes you're going to use, and Maypole will work out the tables and set up the inheritance relationships as normal.
setup
This method is inherited from Maypole::Model::Base and calls setup_database, which uses Class::DBI::Loader to create and load Class::DBI classes from the given database schema.
This method loads the model classes for the application
returns class for given table
This class method is passed the name of a model class that represensts a table and allows the master model class to do any set-up required.
Maypole::Model::Base
Maypole::Model::CDBI
To install Maypole, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Maypole
CPAN shell
perl -MCPAN -e shell install Maypole
For more information on module installation, please visit the detailed CPAN module installation guide.