Re: [Maypole] Extending model class

From: Kevin Connor (kconnor at proofpoint.com)
Date: Wed Oct 06 2004 - 17:40:19 BST


are you sure adding the
MyApp::DBI::MyModel->require
call to MyDriver.pm doesn't work? The examples for extending BeerDB
don't actually work until the require calls are put into BeerDB.pm after
setup.

-Kevin

Paul Makepeace wrote:
> I'm sure I should be getting this but it's just not happening..
>
>
> I have a custom subclass of Maypole::Model::CDBI to do my own
> Class::DBI::Loader thing (I think $loader should be a parameter, but
> anyway). This creates a bunch of model classes in my chosen namespace
> MyApp::DBI as usual.
>
> Now, I would like to be able to define custom actions (as in
> /table/action). So AIUI there needs to be additional methods in the
> model class. So question is: how is this done in a non-evil way?
>
> I can't make MyApp/DBI/MyModel.pm and MyApp::DBI::MyModel->require
> as it's already loaded. The only solution I've had that seems to
> work is pasting the text into MyDriver.pm (complete with package
> *_ATTRIBUTES stuff).
>
> [aside: I would actually like the Loader'ed stuff in DBI::MyModel, CDBI
> stuff in DBI.pm (e.g. add_constructor's) and then my customizations in
> MyModel - best way of doing this is via modifying class_of() ? How are
> other people solving this?]
>
> I read http://maypole.perl.org/?ManualModel but it seems to run out
> exactly where I need it :)
>
> Thanks, Paul
>
>

_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole



This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:56 GMT