[cgiapp] [Announce] CGI::Application::Plugin::Email
Octavian Rasnita
orasnita at gmail.com
Wed Feb 18 03:16:30 EST 2009
From: "Perrin Harkins" <pharkins at gmail.com>
> On Tue, Feb 17, 2009 at 12:39 PM, Lyle <webmaster at cosmicperl.com> wrote:
>> Very easy lazy loaded emailing based on Email::Stuff (with it's new Pure
>> Perl dependency options).
>
> I know you mean well with this, but trivial wrappers around other
> modules described as plugins is the kind of thing that made me stop
> taking Catalyst seriously. I mean, you could do this sort of plugin
> for basically everything on CPAN (and Catalyst did).
Using (or creating plugins) for Catalyst is discouraged, because there are better methods for doing the same thing.
> If you were to extract the lazy-loading code into a sort of generic
> plugin module that can wrap anything and then give Email::Stuff as a
> SYNOPSIS example, that would be more interesting.
>
> - Perrin
If the external module can be wrapped as a model, there are Catalyst::Model::Adapter, Catalyst::Model::Factory and Catalyst::Model::Factory::PerRequest generic modules that can make the external module be a model.
For example, the email-sending module Mail::Builder::Simple can be used in Catalyst as a model with the help of the generic module Catalyst::Model::Factory, and for beeing even more simple to use it, I've created the helper module Catalyst::Helper::Model::Email that creates that model, but Mail::Builder::Simple is very easy to configure, so that helper doesn't do very many things.
Octavian
More information about the cgiapp
mailing list