Why not adopt me?
NAME
HTML::Widget::Plugin::Attrs - an HTML attribute string
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 <rjbs @ cpan.org
>
COPYRIGHT
Copyright (C) 2008, Ricardo SIGNES. This is free software, released under the same terms as perl itself.