[html-formfu] what is the use of InstancePerContext in HTML::FormFu ?

Francesc Romà i Frigolé francesc.roma at gmail.com
Mon Mar 9 11:51:43 GMT 2009


On Mon, Mar 9, 2009 at 11:25 AM, Carl Franks <fireartist at gmail.com> wrote:

> 2009/3/9 Francesc Rom=E0 i Frigol=E9 <francesc.roma at 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"=99 ;)
>
>
>
Thanks for the explanation Carl. I understand it now. I think :)

Francesc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/html-formfu/attachments/20090309/10=
f81790/attachment-0001.htm


More information about the HTML-FormFu mailing list