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

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

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.202   Source  

NAME ^

HTML::Widget::Plugin - base class for HTML widgets

VERSION ^

version 0.202

DESCRIPTION ^

This class provides a simple way to write plugins for HTML::Widget::Factory.

METHODS ^

new

  my $plugin = Plugin->new( \%arg );

The default plugin constructor is really simple. It requires that the argument is either a hashref or not given.

rewrite_arg

 $arg = $plugin->rewrite_arg($arg);

This method returns a reference to a hash of arguments, rewriting the given hash reference to place arguments that are intended to become element attributes into the attr parameter.

It moves attributes listed in the results of the attribute_args method.

attribute_args

This method returns a list of argument names, the values of which should be used as HTML element attributes.

The default implementation climbs the plugin's inheritance tree, calling _attribute_args and pushing all the results onto a list from which unique results are then returned.

boolean_args

This method returns a list of argument names, the values of which should be treated as booleans.

The default implementation climbs the plugin's inheritance tree, calling _boolean_args and pushing all the results onto a list from which unique results are then returned.

provided_widgets

This method should be implemented by any plugin. It returns a list of method names which a factor should delegate to this plugin.

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: