]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Maypole/Model/CDBI/Plain.pm
Change author acknowledge to explicit copyright statement.
[maypole.git] / lib / Maypole / Model / CDBI / Plain.pm
index 2c2d869a51679f24188cdddfb2ecafd8e59ba8f3..9cce6886c03f50678d7701da074edab646a2aaa0 100644 (file)
@@ -1,5 +1,9 @@
 package Maypole::Model::CDBI::Plain;
 package Maypole::Model::CDBI::Plain;
+use Maypole::Config;
 use base 'Maypole::Model::CDBI';
 use base 'Maypole::Model::CDBI';
+use strict;
+
+Maypole::Config->mk_accessors(qw(table_to_class));
 
 sub setup_database {
     my ( $self, $config, $namespace, $classes ) = @_;
 
 sub setup_database {
     my ( $self, $config, $namespace, $classes ) = @_;
@@ -26,15 +30,27 @@ Maypole::Model::CDBI::Plain - Class::DBI model without ::Loader
     use Foo::SomeTable;
     use Foo::Other::Table;
 
     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
     Foo->setup([qw/ Foo::SomeTable Foo::Other::Table /]);
 
 =head1 DESCRIPTION
 
 This module allows you to use Maypole with previously set-up
-C<Class::DBI> classes; simply call C<setup> with a list reference
+L<Class::DBI> classes; simply call C<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.
 
 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<Maypole::Model::Base>
+
 =cut
 
 =cut