[Catalyst] Catalyst::Plugin::FormValidato->form method - naming of the method and parameter (call to Data::FormValidator->check)

kakimoto at tpg.com.au kakimoto at tpg.com.au
Sun Aug 17 02:32:03 BST 2008

Dear all,

1) Since Catalyst::Plugin::FormValidator is considered a "thin" wrapper
around Data::FormValidator, shouldn't we be keeping the naming
conventions the same?

2) 'form' seems to call  Data::FormValidator->check , why can't we call
it "check" instead of "form"?

3) the second parameter to the Data::FormValidator->check  call - would
it not be better called as dfv_profile (as per Data::FormValidator's
documentation where this is the data form validator profile)?

Just my 2 cents to help lean out the learning curve for people wanting
to use Catalyst.

Extract : 'form' method source code

sub form {
    my $c = shift;
    if ( $_[0] ) {
        my $form = $_[1] ? {@_} : $_[0];
        $c->{form} =
          Data::FormValidator->check( $c->request->parameters, $form );
    return $c->{form};

More information about the Catalyst mailing list