X-Git-Url: https://git.decadent.org.uk/gitweb/?p=maypole.git;a=blobdiff_plain;f=lib%2FMaypole%2FManual%2FModel.pod;h=98f54cd093c495b800a66459a5d676c139d21b5c;hp=112effcb44d90e3823319adf4b994f5dfc63cb68;hb=e8ebb9e2413d25fe7accc675387dfad270d7367e;hpb=404332b8ba75418b239e71fd8dcd142bc2a2f90c diff --git a/lib/Maypole/Manual/Model.pod b/lib/Maypole/Manual/Model.pod index 112effc..98f54cd 100644 --- a/lib/Maypole/Manual/Model.pod +++ b/lib/Maypole/Manual/Model.pod @@ -56,6 +56,29 @@ The second reason why we want our table classes to inherit from C is because it provides a useful set of default actions. So what's an action, and why are they useful? + +=head2 Maypole::Model::CDBI::Plain + +The 'Plain' maypole Model : C allows you + + package Foo; + use 'Maypole::Application'; + + Foo->config->model("Maypole::Model::CDBI::Plain"); + Foo->setup([qw/ Foo::SomeTable Foo::Other::Table /]); + + # untaint columns and provide custom actions for each class + + Foo::SomeTable->untaint_columns(email => ['email'], printable => [qw/name description/]); + + Foo::Other::Table->untaint_columns ( ... ); + + sub Foo::SomeTable::SomeAction : Exported { + + . . . + + } + =head2 Extending a model class with actions Maypole operates primarily by turning URLs into method calls on a model @@ -118,3 +141,5 @@ chapter and our case studies. L, Next L, Previous L + +=cut