X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=lib%2FMaypole%2FModel%2FCDBI%2FPlain.pm;h=0dee774b9813ef34dd37df9bb6c9d668aea78338;hb=d3a3498e58b23918b3311da94f706bbfe2a576ee;hp=6c2709c7095e5ef3e170edfdadcef500215a9173;hpb=ef3da5818c452a331e863d30efc41f5b65d0f624;p=maypole.git diff --git a/lib/Maypole/Model/CDBI/Plain.pm b/lib/Maypole/Model/CDBI/Plain.pm index 6c2709c..0dee774 100644 --- a/lib/Maypole/Model/CDBI/Plain.pm +++ b/lib/Maypole/Model/CDBI/Plain.pm @@ -1,5 +1,8 @@ package Maypole::Model::CDBI::Plain; use base 'Maypole::Model::CDBI'; +use strict; + +Maypole::Config->mk_accessors(qw(table_to_class)); sub setup_database { my ( $self, $config, $namespace, $classes ) = @_; @@ -26,13 +29,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.