From: John M. Dlugosz If Catalyst had something called an "accessory" that could draw upon the auto-discovery, loading, configuration, etc. of Components, but did not claim to be "a model", I might agree.
A model is not only a source of data, but also a destination of data. When sending email, some data is sent to a certain destination. However, I agree that some actions like sending email is not very appropriate for a view nor for a model, but for another kind of "accessory" with a more appropriate name as you said, but this is only because the words "view" or "model" are usually used for something else, so... it's just words. When we need to call a certain method in a controller we need to use $c->forward(), although it doesn't involve any forward or redirection, but again... there are just some words. Another advantage of using a model versus creating the object and using a mailer directly is that maybe after a certain time will appear a much better mailer than Mail::Builder::Simple, and you may want to switch to the new mailer. In that case you will need to make some changes in a single model, and not in every controller. Octavian
_______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
