On 9 Apr 2008, at 20:07, Markus Holzer wrote:
Moritz Onken schrieb:
But is it really a plugin? I'd prefer to use it as a controller
base class because it is controller specific. This way you could
chose which controllers should use this plugin and let the others
do their work without being disturbed by this plugin (and you
could still use it in the Root controller).
Yes, it is a plugin. A key feature is to be able to specify a
"paranoid mode" in which no action will be run if there is no
parameter spec for it.
Also you can still use it Controller-wise. If you omit the code in
the "begin : Private" action, the plugin will silently do it's
validation and place it's results
in $c->request->{validated}and $c->request->{validation_error} (if
any). You can ask for them frim within the controller and act
accordingly.
But for me, the main point of this beast is that i can drop a
formal parameter definition next to a controller/action without
cluttering the controller code.
(as formbuilder does and following the catalyst credo "dont repeat
yourself" =)
What, you mean like Catalyst::Controller::Formbuilder? If so,
emulate its example. The FB plugin is deprecated.
_______________________________________________
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/