[Catalyst] Wrrite your own Model-class

Ash Berlin ash at cpan.org
Mon Jun 19 17:50:33 CEST 2006


Karl.Moens at marsh.com wrote:
>
>
> Dear List-members,
>
> Having made already a few Catalyst web-sites for our office and our
> clients, I now want to embark on writing a Catalyst application for myself!
> As I run my own IMAP-mail server, I thought of writing a web-based
> front-end so I can look at the mails on my IMAP-server from anywhere in the
> world.
>
> Unfortunately there is (yet) no Catalyst::Model::IMAP available, so I
> considered --most audaciously-- to start writing such a model myself. I had
> a look at various models (such as DBIC) but could not easily re-engineer
> the rules I must follow to write such a model-class.
>
> I did find the "Writing plug-ins" tutorial and wonder whether a "Model is
> just a kind of "Plugin" with another name. If not, is there somewhere a
> handy guide to start writing Models? I do agree to keep a log of my
> wanderings on the path of writing a Model and make it available once the
> Catalyst::Model::IMAP is finished.
>
> Karl
> aka CountZero on Perlmonks
You are essentially right when you say "Model is just a kind of "Plugin" 
with another name".

Theres not much more to it than swiping the skeleton from another model 
and then extending it - thats what I did.

Ash




More information about the Catalyst mailing list