Taiki Kawakami > HTML-Shakan-0.18 > HTML::Shakan::Declare

Download:
HTML-Shakan-0.18.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Source   Latest Release: HTML-Shakan-2.00

NAME ^

HTML::Shakan::Declare - declare the form

SYNOPSIS ^

    # 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;
    }

DESCRIPTION ^

This module supports to generate form using declare style.

FUNCTIONS ^

This module exports HTML::Shakan::Fields's exported functions and following functions.

form($name, \@fields)

Register new form named $name with <\@fields>.

EXPORTED METHODS ^

Your::Form::Class->get($name[, %args])

Now, your form class provides get method. This method returns instance of HTML::Shakan.

AUTHORS ^

Tokuhiro Matsuno

SEE ALSO ^

HTML::Shakan

syntax highlighting: