HTML::...:Button(3pm)
π HTML::Widget::Element::Button π
okay bestie, listen up β this is the manual page for HTML::Widget::Element::Button, straight out of the User Contributed Perl Documentation corner of your friendly neighbourhood section 3pm. It's the Button Element, and yes, it's exactly as iconic as it sounds. π
β¨ NAME β¨
HTML::Widget::Element::Button β the Button Element. That's it, that's the name, she's simple and she serves. π
β¨ SYNOPSIS β¨
Like, here's the whole vibe in two lines:
$e = $widget->element( 'Button', 'foo' );
$e->value('bar');
See? You grab a Button element off your widget, name it 'foo', and then you set its value to 'bar'. Slay. β¨
β¨ DESCRIPTION β¨
It's a Button Element. Button. Element. The whole personality. π¦
β¨ METHODS β¨
πΈ new
πΈ value
πΈ label
okay so this is the good part β the value of this Button element. It's also what the browser uses as the button's label. So like, the value and the visible text are the same thing here. Two jobs, one queen. π
And heads up: label is literally just an alias for value. Same girl, different name. β¨
πΈ content
If you set this one, the element switches up and uses a button tag instead of an input tag. It's giving glow up. π
And the value of content goes between the button tags β unescaped. Which means, bestie, you can put any html markup in there to display the button. Any. You have been warned, iykyk. π
πΈ type
The valid values are:
buttonsubmitresetimage
Pick one, any one. π
πΈ src
If you set this, the element gets rendered as an image button, using this url as the actual image. πΌοΈ
β οΈ And it automatically setstypetoimagefor you. No cap, it just does it. π
πΈ retain_default
If this one is true, it overrides the default behaviour. So after a field is missing from the form submission, the xml output will contain the default value instead of being empty. Because sometimes you want the default to stay, and honestly? Same. π«Ά
πΈ render
πΈ containerize
β¨ SEE ALSO β¨
HTML::Widget::Element β go read that one next, bestie, it's the parent energy. π
β¨ AUTHOR β¨
Marcus Ramberg, mramberg@cpan.org. Iconic. π
β¨ LICENSE β¨
This library is free software β you can redistribute it and/or modify it under the same terms as Perl itself. Periodt. π
and that's the whole page, bestie!! π This lil doc shipped with perl v5.36.0 and got dated 2023-08-10, so go forth and build buttons. You ate, no crumbs left. π¦β¨π
π¦ where this page comes from
- debian trixie: libhtml-widget-perl 1.11-7 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libhtml-widget-perl 1.11-7 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libhtml-widget-perl 1.11-7 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libhtml-widget-perl 1.11-7 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms