[html-formfu] Include Catalyst::Controller::RequestToken in C::C::HTML::FormFu

Carl Franks fireartist at gmail.com
Fri Jan 16 09:54:25 GMT 2009


2009/1/16  <onken at houseofdesign.de>:
>
> seems like MultiForm doesn't support "plugins":

Ok, just forget about Multiforms for now, and put the controller code
into sub _form {}

> So far I created a new Element::Token and Constraint::Token which is
> attached to $form using Plugin::Token. Plugin::Token is set automatically
> if $config->{token_enable} is set. Plugin::Token does nothing else than
> attaching Element::Token to $form. The logic is in Element::Token and
> Constraint::Token.
>
> Do you think this is a sane approach?

That sounds ok.
Though, could you call them Element::RequestToken and
Constraint::RequestToken, and config 'request_token_*' ?
I've found with previous constraints, etc, that it's much easier to
remember the names first time if they exactly match the modules they
use / expand on.
It's always more enjoyable to get things right first time, than to
have to open up the docs to look up names.

Cheers,
Carl



More information about the HTML-FormFu mailing list