2009/3/9 Francesc Romà i Frigolé <francesc.r...@pharos.cat>:
> I'm looking at the source code of Catalyst::Controller::HTML::FormFu and I'd
> like to know what the module Catalyst::Component::InstancePerContext is used
> for.
>
> I've read that Jonathan Rockway advises against this technique here:
> http://search.cpan.org/perldoc?Catalyst::Component::ACCEPT_CONTEXT
>
>> The best strategy, though, is not to use the context inside your model.
>> It's best for your Controller to pull the necessary data from the context,
>> and pass it as arguments:

"inside your model"

Catalyst-Controller-HTML-FormFu isn't a model.

Custom constraints / validators are the main thing that may need
access to the context, where it's not possible to pass it as an
argument.
I don't know why InstancePerContext is better than ACCEPT_CONTEXT, "I
just used it because mst said to"™ ;)

Carl

_______________________________________________
HTML-FormFu mailing list
HTML-FormFu@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

Reply via email to