[Catalyst-dev] RFC: Catalyst::View::Email and Catalyst::View::TemplateEmail

J. Shirley jshirley at gmail.com
Thu Mar 22 21:16:13 GMT 2007


On 3/20/07, Tom Lanyon <tom at netspot.com.au> wrote:
> J. Shirley wrote:
> > Good point and idea, mail/$mime-type/$template.tt -- I'll also put in
> > an option to include everything by doing checks if the template exist.
>
> I like that. The $template.$mimetype.tt suggestion from Aristotle is
> good but is it creating extra clutter in itself? I think you should have
> a single convention and stick to it and it alone.
>
> > A mailing error, as best as we can detect, would be thrown in the
> > View.  I'm debating whether to go with an exception that needs to be
> > caught, or some other mechanism.  Thoughts on this welcome.  I'm
> > leaning more towards just throwing an exception.
>
> I think there needs to be some way to capture these exceptions in the
> next View which is forwarded to. For example, a basic controller used to
> send mail to a user would forward to View::Email then to
> View::{TT,Mason,etc} to display a message of success or failure. I'm not
> sure on the best way to do this, but even just setting a
> $c->stash->{mail_err} which can be checked by subsequent views would
> suffice in my mind.
>
> --
> Tom Lanyon
>
>

I think that $mailroot/$mimetype/$template.tt is the winner.  Then an
auto-detect or explicit inclusion list (if explicit inclusion list is
provided, and a template is not found, throw an exception).

I'll create the dir in the SVN and start hacking on this over the next
few weeks as free time permits.

I am thinking the name "Catalyst-View-TemplateEmail" -- everybody like that?

-Jay

-- 
J. Shirley :: jshirley at gmail.com :: Killing two stones with one bird...
http://www.toeat.com



More information about the Catalyst-dev mailing list