X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=lib%2FMaypole.pm;h=fe2d29a0c5dad032b905a55aade0945b1faffd3d;hb=0e62abcbcaa42ab927cc252bd96b3a0e2e1a0408;hp=3fcfd159a835442d78ec806fdb1c948765e25efd;hpb=28823167d12d4cd1419cc6a58900c0fc5819e1af;p=maypole.git diff --git a/lib/Maypole.pm b/lib/Maypole.pm index 3fcfd15..fe2d29a 100644 --- a/lib/Maypole.pm +++ b/lib/Maypole.pm @@ -253,7 +253,7 @@ Some packages respond to higher debug levels, try increasing it to 2 or 3. =cut -sub debug { 0 } +sub debug { 0 } =item config @@ -261,20 +261,34 @@ Returns the L object =item setup - My::App->setup($data_source, $user, $password, \%attr); - -Initialise the Maypole application and plugins and model classes - see -L. - -If your model is based on L, the C<\%attr> hashref can -contain options that are passed directly to L, to control -how the model hierarchy is constructed. + My::App->setup($data_source, $user, $password, \%attr); +Initialise the Maypole application and plugins and model classes. Your application should call this B setting up configuration data via L<"config">. +It calls the hook C to setup the model. The %attr hash contains +options and arguments used to set up the model. See the particular model's +documentation. However here is the most usage of setup where +Maypole::Model::CDBI is the base class. + + My::App->setup($data_source, $user, $password, + { opitons => { # These are DB connection options + AutoCommit => 0, + RaiseError => 1, + ... + }, + # These are Class::DBI::Loader arguments. + relationships => 1, + ... + } + ); + +Also, see L. + =cut + sub setup { my $class = shift;