HTML::Shakan::Declare - declare the form
# declare { package My::Form; use HTML::Shakan::Declare; form 'add' => ( TextField( name => 'name', required => 1, ), TextField( name => 'email', required => 1, ), ); } # use it { my $form = My::Form->get( 'add' => ( request => CGI->new, ) ); $form->render; }
This module supports to generate form using declare style.
This module exports HTML::Shakan::Fields's exported functions and following functions.
Register new form named $name with <\@fields>.
<\@fields
Now, your form class provides get method. This method returns instance of HTML::Shakan.
Tokuhiro Matsuno
HTML::Shakan
To install HTML::Shakan, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::Shakan
CPAN shell
perl -MCPAN -e shell install HTML::Shakan
For more information on module installation, please visit the detailed CPAN module installation guide.