NAME
Borang::HTML - Generate HTML form from Rinci metadata
VERSION
This document describes version 0.02 of Borang::HTML (from Perl distribution Borang), released on 2015-09-22.
INTERNAL RECORD ($r)
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.
gen_args => hash
Arguments passed to gen_html_form()
.
meta => hash
values => hash
prefix => str
Prefix, should be ''
(empty string), unless when processing subforms (argument submetadata) in which is it will be a slash-separated string.
argname => str
Current argument name that is being processed.
argfqname => str
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
.
argvalue => any
Current argument's value. Provided for convenience. This is taken from values
, or argument specification's default
, or schema's default
.
argspec => array
Current argument's specification. Provided for convenience. Can also be retrieved via meta->{args}{$argname}
.
argschema => array
Current argument's schema. Provided for convenience. Can also be retrieved via argspec->{schema}
.
FUNCTIONS
gen_html_form(%args) -> any
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)
HOMEPAGE
Please visit the project's homepage at https://metacpan.org/release/Borang.
SOURCE
Source repository is at https://github.com/perlancar/perl-Borang.
BUGS
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.
AUTHOR
perlancar <perlancar@cpan.org>
COPYRIGHT AND LICENSE
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.