Chloro::Result::Field - A result for a single field
version 0.06
my $result = $resultset->result_for('field'); print $result->field()->name() . ' = ' . $result->value();
This class represents the result for a single field after processing user-submitted data.
This class has the following methods:
The constructor accepts the following arguments:
errors
An array reference of Chloro::Error::Field objects. This is required, but can be an empty reference.
field
The Chloro::Field object for this result.
value
The value for the result. This can be any data type.
Returns a list of Chloro::Error::Field objects for this result.
Returns true if there are no errors associated with this result.
Returns the Chloro::Field object for this result.
Returns an array reference of the parameter keys associated with this field. The names are returned by the extractor method. For most fields, this will always be a one value arrayref, but it could be empty or have multiple names with a custom extractor.
Returns the value for this field. This can be any data type, undef, non-reference, reference, object, etc.
Returns the result as a key/value pair, where the key is the field name. This is plural so that this class and the Chloro::Result::Group class can share an API.
This class does the Chloro::Role::Result role.
Dave Rolsky <autarch@urth.org>
This software is Copyright (c) 2011 by Dave Rolsky.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
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.