CGI::Test::Form::Widget(3pm) | User Contributed Perl Documentation | CGI::Test::Form::Widget(3pm) |
CGI::Test::Form::Widget - Ancestor of all form widget classes
# Deferred class, only heirs can be created
The "CGI::Test::Form::Widget" class is deferred. It is an abstract representation of a <FORM> widget, i.e. a graphical control element like a popup menu or a submit button.
Here is an outline of the class hierarchy tree, with the leading "CGI::Test::Form::" string stripped for readability, and a trailing "*" indicating deferred classes:
Widget* . Widget::Box* . . Widget::Box::Check . . Widget::Box::Radio . Widget::Button* . . Widget::Button::Plain . . Widget::Button::Submit . . Widget::Button::Image . . Widget::Button::Reset . Widget::Hidden . Widget::Input* . . Widget::Input::Text_Area . . Widget::Input::Text_Field . . Widget::Input::File . . Widget::Input::Password . Widget::Menu* . . Widget::Menu::List . . Widget::Menu::Popup
Only leaf nodes are concrete classes, and there is one such class for each known control type that can appear in the <FORM> element.
Those classes are constructed as needed by "CGI::Test". They are the programmatic artefacts which can be used to manipulate those graphical elements, on which you would otherwise click and fill within a browser.
This is the interface defined at the "CGI::Test::Form::Widget" level, and which is therefore common to all classes in the hierarchy. Each subclass may naturally add further specific features.
It is very important to stick to using common widget features when writing a matching callback for the "widgets_matching" routine in "CGI::Test::Form", or you run the risk of getting a runtime error since Perl is not statically typed.
Those predicates may be used to determine whether it is possible to change the value of a widget from the user interface.
This predicate is not architecturally defined: a widget may or may not be marked as disabled in HTML via a suitable attribute.
When the optional warn_flag is true, "carp" is called to emit a warning from the perspective of the caller.
Those predicates may be used to determine the overall widget type. The classification is rather high level and only helps determining the kind of calls that may be used on a given widget object.
Although documented, those features are more targetted for internal use...
This routine is invoked to compute the parameter list that must be sent back when pressing a submit button.
The original author is Raphael Manfredi.
Steven Hilton was long time maintainer of this module.
Current maintainer is Alexander Tokarev <tokarev@cpan.org>.
CGI::Test::Form(3), CGI::Test::Form::Widget::Box(3), CGI::Test::Form::Widget::Button(3), CGI::Test::Form::Widget::Input(3), CGI::Test::Form::Widget::Hidden(3), CGI::Test::Form::Widget::Menu(3).
2022-06-10 | perl v5.34.0 |