[Catalyst-dev] RFC: Catalyst::View::Email
and Catalyst::View::TemplateEmail
Tom Lanyon
tom at netspot.com.au
Wed Mar 21 04:18:05 GMT 2007
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
More information about the Catalyst-dev
mailing list