|
Apache::Wyrd::Input::Complex - Abstract class for more complex Wyrds |
Apache::Wyrd::Input::Complex - Abstract class for more complex Wyrds (hashes/structures)
NONE
Occasionally, an Input is needed which is too complicated to reduce to a single parameter or control. These might be items in a sub-table or otherwise related information to the main information being requested. If it can be reduced to a single data structure, such as an arrayref to an array of hashes, it can be handled by the Complex Input Wyrd.
Form objects need a certain behavior out of the Inputs they handle. The form will be calling certain methods and expecting certain outcomes. This module abstract-ifies those requirements and consists of hook methods which must be overridden in a subclass. The normal behavior of these methods is to cause an exception to be raised and to emit an error message concerning the method which requires overriding.
Another implementation of the Complex Input is available which simply
combines the values of all classic ``inputs'' into a single hashref. See
Apache::Wyrd::Input::Condenser. This will be suitable for many
complex operations, so try it first before implementing a complex Input
object from scratch.
In the documentation below, the indeterminate structure that the data this Input represents is denoted by STRUCTURE.
unlike other Input Wyrds, Complex does not handle standard attributes such as class and onselect, except as implemented by the developer.
As is, there are no default attributes other than:
see Apache::Wyrd::Input for ``normal'' Input Wyrd behavior. The
methods requiring overriding are:
final_output (void)check (STRUCTURE)current_value (void)set (STRUCTURE)check, and
parent->register_errors, parent->register_error_messages
when there are errors, and set the value that value returns.
default (void)value (void)_get_value (Apache::Wyrd::Input)
Reserves the _setup, _format_output, and _generate_output.
Also overerides the register_input and _parse_options methods from
Apache::Wyrd::Input. methods.
Barry King <wyrd@nospam.wyrdwright.com>
Copyright 2002-2004 Wyrdwright, Inc. and licensed under the GNU GPL.
See LICENSE under the documentation for Apache::Wyrd.
|
Apache::Wyrd::Input::Complex - Abstract class for more complex Wyrds |