NAME

HTML::Widget::Plugin::Attrs - an HTML attribute string

VERSION

version 0.201

DESCRIPTION

This plugin produces HTML attribute strings.

METHODS

provided_widgets

This plugin provides the following widgets: attrs

attrs

This method returns HTML attribute strings, so:

$factory->attrs({
  size => 10,
  name => q(Michael "Five-Toes" O'Gambini),
});

will produce something like:

size="10" name="Michael "Five-Toes""

None of the standard argument rewriting applies. These are the valid arguments:

-tag

This may be the name of an HTML element. If given, it will be used to look up what attributes are boolean.

-bool

This may be an arrayref of attribute names to treat as boolean arguments.

All attributes not beginning with a dash will be treated as attributes for the attribute string. Boolean attributes will always have the attribute name as the value if true, and will be omitted if false.

If both -tag and -bool are given, they are unioned.

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.