Chloro::Group - A field in a form
version 0.07
See Chloro.
This class represents a group in a form.
This class has the following methods:
You'll probably make groups by using the group() subroutine exported by Chloro, but you can make one using this constructor.
group()
The constructor accepts the following parameters:
name
The name of the group. This is required.
human_name
A more friendly version of the name. This defaults to the same value as name.
fields
An array reference of Chloro::Field objects for this group. This is required.
repetition_key
The name of the key field for repetitions.
is_empty_checker
This is an optional method on the field's form that will be used to extract this field's value.
The name as passed to the constructor.
A more friendly name, which defaults to the same value as $group->name().
$group->name()
Returns a list of Chloro::Field objects for this group
Given a name, returns the field of that name in the group, if one exists.
The name of the repetition key field for this group.
Returns the method used to determine whether the group is empty. This defaults to _group_is_empty, a method provided by Chloro::Role::Form.
Returns a data structure representing the group definition. This exists primarily for testing.
This class consumes the Chloro::Role::FormComponent role.
Bugs may be submitted at http://rt.cpan.org/Public/Dist/Display.html?Name=Chloro or via email to bug-chloro@rt.cpan.org.
I am also usually active on IRC as 'autarch' on irc://irc.perl.org.
irc://irc.perl.org
The source code repository for Chloro can be found at https://github.com/autarch/Chloro.
Dave Rolsky <autarch@urth.org>
This software is Copyright (c) 2017 by Dave Rolsky.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
The full text of the license can be found in the LICENSE file included with this distribution.
To install Chloro, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Chloro
CPAN shell
perl -MCPAN -e shell install Chloro
For more information on module installation, please visit the detailed CPAN module installation guide.