CGI::T...::Radio(3pm)
π NAME π
CGI::Test::Form::Widget::Box::Radio β it's the radio button widget bestie, and yes it's exactly as iconic as it sounds π
β¨ SYNOPSIS β¨
okay so here's the vibe, straight up:
# Inherits from CGI::Test::Form::Widget::Box
# $form is a CGI::Test::Form
my @title = $form->radios_named("title");
my ($mister) = grep { $_->value eq "Mr" } @title;
$mister->check if defined $mister;
my $title = $form->radio_by_name("title");
$title->check_tagged("Mr");
no cap, that's the whole thing. grab ur radios, check one, slay π
π¦ DESCRIPTION π¦
okay so this class? it represents a radio button widget. and the whole thing with radio buttons is that users can check them at will β like, whenever they want, no permission needed, main character energy fr. but here's the tea: the moment one gets checked, all the other radio buttons in the same group get automatically unchecked. periodt. that's just how groups work π
now, plot twist: if no radio button is checked initially, CGI::Test will arbitrarily pick the first one listed and hit you with a warn. so like, don't be surprised when that happens, it's just doing its thing π
the interface? same one described in CGI::Test::Form::Widget::Box. no new nonsense, we're consistent here β¨
and listen β any attempt to "uncheck" a radio button is ignored, and a warning gets emitted via carp to help you find the caller. so like, if ur out here trying to uncheck a radio, the code is literally gonna @ you in the warnings. it's giving "I saw what you did" π
fr fr, read the carp warning β it's telling you exactly who called it. free debugging, bestie, take the gift π«Ά
π AUTHORS π
- The original author is Raphael Manfredi.
- Steven Hilton was long time maintainer of this module.
- Current maintainer is Alexander Tokarev
<tokarev@cpan.org>.
three legends, one module π
π SEE ALSO π
go read those too, iykyk π
and that's the whole page bestie!! this was perl v5.34.0, dated 2022-06-10, from the User Contributed Perl Documentation πβ¨ thanks for reading, ur officially a radio button expert now, go forth and check things ππ π¦
π¦ 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