CGI::T...::Check(3pm)
π CGI::Test::Form::Widget::Box::Check β the checkbox page π
okay so bestie, welcome to the glow-up era of CGI::T...::Check(3pm) β yes the title is literally abbreviated like that in the Perl docs, no I will not be fixing it, it's giving mysterious. this is a page from the User Contributed Perl Documentation and it's all about the checkbox widget. let's get into it π
β¨ NAME β¨
CGI::Test::Form::Widget::Box::Check β a checkbox widget. that's it, that's the whole vibe. a little box. you click it. it's checked. iconic behavior honestly π
β¨ SYNOPSIS β¨
here's the whole thing, copied exactly, do not perceive me editing it:
# Inherits from CGI::Test::Form::Widget::Box
# $form is a CGI::Test::Form
my ($agree, $ads) = $form->checkbox_by_name(qw(i_agree ads));
die "expected a standalone checkbox" unless $agree->is_standalone;
$agree->check;
$ads->uncheck_tagged("spam OK");
so first line, we're inheriting from CGI::Test::Form::Widget::Box, which like, slay, family business π
. $form is a CGI::Test::Form in case you were wondering.
then we grab two checkboxes at once with $form->checkbox_by_name(qw(i_agree ads)) and they land in ($agree, $ads). two besties, one call, we love efficiency π«Ά
then the die line: die "expected a standalone checkbox" unless $agree->is_standalone; β we are manifesting that $agree is a standalone checkbox and if it's not, we crash out. periodt.
then $agree->check; β check it, bestie β
and $ads->uncheck_tagged("spam OK"); β untag that one, "spam OK" does NOT get to stay checked, not on our watch π
β¨ DESCRIPTION β¨
so this class represents a checkbox widget. and the way that it works is β users can check it or uncheck it, at will, whenever they want, no cap. total freedom, total main character energy.
and here's the lowkey important bit: the interface is the same as the one described in CGI::Test::Form::Widget::Box. so if you already know Box, you already know this. if you don't... girl, go read Box. iykyk πΈ
β¨ AUTHORS β¨
giving credit where credit is due, fr fr:
- the original author is Raphael Manfredi.
- Steven Hilton was long time maintainer of this module. (their words, not mine β "long time maintainer", respect the tenure π)
- current maintainer is Alexander Tokarev
<tokarev@cpan.org>.
three icons, one module. the lineage is unmatched π
β¨ SEE ALSO β¨
go read these next, bestie, they're the whole friend group:
like. the Box and the Radio. the checkbox's siblings. family reunion π
ngl this page is short and sweet and i am obsessed with that for us. checkbox lore: acquired. no notes π
sign-off time πΈ β this page is from perl v5.34.0, dated 2022-06-10, and it's CGI::T...::Check(3pm) in the User Contributed Perl Documentation. mwah, go check some boxes bestie πβ¨
π¦ where this page comes from
- debian bookworm: libcgi-test-perl 1.111-2 Β· Artistic-1.0-Perl
- debian trixie: libcgi-test-perl 1.111-2 Β· Artistic-1.0-Perl
- ubuntu noble: libcgi-test-perl 1.111-2 Β· Artistic-1.0-Perl
- ubuntu resolute: libcgi-test-perl 1.111-2 Β· Artistic-1.0-Perl
- ubuntu stonking: libcgi-test-perl 1.111-2 Β· Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms