X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=lib%2FMaypole%2FModel%2FCDBI%2FPlain.pm;h=9cce6886c03f50678d7701da074edab646a2aaa0;hb=8b68aa68ac5e83bc439d16c1fda0fb3870ee246c;hp=e4f6cfc5dc419af8d99d6961c5469483cf2e860a;hpb=7913f720113bfd85b59a9fed57a60ec7a665fb39;p=maypole.git diff --git a/lib/Maypole/Model/CDBI/Plain.pm b/lib/Maypole/Model/CDBI/Plain.pm index e4f6cfc..9cce688 100644 --- a/lib/Maypole/Model/CDBI/Plain.pm +++ b/lib/Maypole/Model/CDBI/Plain.pm @@ -1,5 +1,7 @@ package Maypole::Model::CDBI::Plain; +use Maypole::Config; use base 'Maypole::Model::CDBI'; +use strict; Maypole::Config->mk_accessors(qw(table_to_class)); @@ -28,13 +30,13 @@ Maypole::Model::CDBI::Plain - Class::DBI model without ::Loader use Foo::SomeTable; use Foo::Other::Table; - Foo->config->{model_class} = "Maypole::Model::CDBI::Plain"; + Foo->config->model("Maypole::Model::CDBI::Plain"); Foo->setup([qw/ Foo::SomeTable Foo::Other::Table /]); =head1 DESCRIPTION This module allows you to use Maypole with previously set-up -C classes; simply call C with a list reference +L classes; simply call C 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.