X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=lib%2FMaypole%2FModel%2FCDBI%2FPlain.pm;h=e4f6cfc5dc419af8d99d6961c5469483cf2e860a;hb=c4f55edd9a4fad76e69643e2d2f068e832d3bc9c;hp=114eb884b830813363772ce69026ef6fb5a6ad9a;hpb=5ba93a09518403ae28e8a71b5299e2458a6dfa0b;p=maypole.git diff --git a/lib/Maypole/Model/CDBI/Plain.pm b/lib/Maypole/Model/CDBI/Plain.pm index 114eb88..e4f6cfc 100644 --- a/lib/Maypole/Model/CDBI/Plain.pm +++ b/lib/Maypole/Model/CDBI/Plain.pm @@ -1,6 +1,8 @@ package Maypole::Model::CDBI::Plain; use base 'Maypole::Model::CDBI'; +Maypole::Config->mk_accessors(qw(table_to_class)); + sub setup_database { my ( $self, $config, $namespace, $classes ) = @_; $config->{classes} = $classes; @@ -22,7 +24,7 @@ Maypole::Model::CDBI::Plain - Class::DBI model without ::Loader =head1 SYNOPSIS package Foo; - use base 'Apache::DBI'; + use base 'Maypole::Application'; use Foo::SomeTable; use Foo::Other::Table; @@ -36,5 +38,17 @@ C 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. +=head1 METHODS + +=over 4 + +=item setup_database + +=item class_of + +=back + +See L + =cut