[Catalyst] Catalyst::Plugin::FormValidator --> What does the '
prepare' method really do and is it necessary?
kakimoto at tpg.com.au
kakimoto at tpg.com.au
Sun Aug 17 02:30:23 BST 2008
hi, guys,
Was looking through Catalyst::Plugin::FormValidator's source code.
Was wondering what does the ' prepare' method really do and is it necessary?
I mean looking at the code, what's the significance of "$c =
$c->NEXT::prepare(@_);".
Was wondering if i could just use ->form straight away and cut the
complexity.
Extract 1: 'Prepare' method source code
==========================
=head3 prepare
Sets up $c->{form}
=cut
sub prepare {
my $c = shift;
$c = $c->NEXT::prepare(@_);
$c->{form} = Data::FormValidator->check( $c->request->parameters, {} );
return $c;
}
thanks
K. Akimoto
More information about the Catalyst
mailing list