Ricardo SIGNES > HTML-Widget-Factory-0.101 > HTML::Widget::Factory

Download:
HTML-Widget-Factory-0.101.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.101   Source   Latest Release: HTML-Widget-Factory-0.201

NAME ^

HTML::Widget::Factory - churn out HTML widgets

VERSION ^

version 0.101

SYNOPSIS ^

 my $factory = HTML::Widget::Factory->new();

 my $html = $factory->select({
   name    => 'flavor',
   options => [
     [ minty => 'Peppermint',     ],
     [ perky => 'Fresh and Warm', ],
     [ super => 'Red and Blue',   ],
   ],
   value   => 'minty',
 });

DESCRIPTION ^

HTML::Widget::Factory provides a simple, pluggable system for constructing HTML form controls.

METHODS ^

Most of the useful methods in an HTML::Widget::Factory object will be installed there by its plugins. Consult the documentation for the HTML::Widget::Plugin modules.

new

  my $factory = HTML::Widget::Factory->new(\%arg);

This constructor returns a new widget factory.

The only valid arguments are plugins and extra_plugins, which provide arrayrefs of plugins to be used. If plugins is not given, the default plugin list is used; this is generated by finding all modules beginning with HTML::Widget::Plugin. The plugins in extra_plugins are loaded in addition to these.

provides_widget

  if ($factory->provides_widget($name)) { ... }

This method returns true if the given name is a widget provided by the factory. This, and not can should be used to determine whether a factory can provide a given widget.

provided_widgets

  for my $name ($fac->provided_widgets) { ... }

This method returns an unordered list of the names of the widgets provided by this factory.

plugins

This returns a list of the plugins loaded by the factory.

TODO ^

SEE ALSO ^

HTML::Widget::Plugin
HTML::Widget::Plugin::Input
HTML::Widget::Plugin::Submit
HTML::Widget::Plugin::Link
HTML::Widget::Plugin::Image
HTML::Widget::Plugin::Password
HTML::Widget::Plugin::Select
HTML::Widget::Plugin::Multiselect
HTML::Widget::Plugin::Checkbox
HTML::Widget::Plugin::Radio
HTML::Widget::Plugin::Button
HTML::Widget::Plugin::Textarea
HTML::Element

AUTHOR ^

Ricardo SIGNES

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2005 by Ricardo SIGNES.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: