Borang::HTML - Generate HTML form from Rinci metadata
This document describes version 0.02 of Borang::HTML (from Perl distribution Borang), released on 2015-09-22.
It is a hash/stash that gets passed around during form generation. The following are the keys that get set, sorted by the order of setting during form generation process.
Arguments passed to gen_html_form().
gen_html_form()
Prefix, should be '' (empty string), unless when processing subforms (argument submetadata) in which is it will be a slash-separated string.
''
Current argument name that is being processed.
Like argname, but fully qualified (e.g. a/b if <b> is a subargument of a). Provided for convenience. Can also be calculated from prefix and argname.
argname
a/b
a
prefix
Current argument's value. Provided for convenience. This is taken from values, or argument specification's default, or schema's default.
values
default
Current argument's specification. Provided for convenience. Can also be retrieved via meta->{args}{$argname}.
meta->{args}{$argname}
Current argument's schema. Provided for convenience. Can also be retrieved via argspec->{schema}.
argspec->{schema}
Generate HTML form from Rinci metadata.
Arguments ('*' denotes required arguments):
action => str
HTML form action.
lang => str
Language.
meta => hash
meta_is_normalized => bool
method => str (default: "POST")
HTML form method.
name => str
HTML form name, will set the <FORM>'s name attribute.
values => hash
Form values.
Return value: (any)
Please visit the project's homepage at https://metacpan.org/release/Borang.
Source repository is at https://github.com/perlancar/perl-Borang.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Borang
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
perlancar <perlancar@cpan.org>
This software is copyright (c) 2015 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Borang, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Borang
CPAN shell
perl -MCPAN -e shell install Borang
For more information on module installation, please visit the detailed CPAN module installation guide.