CGI::T...:Group(3pm)
π CGI::Test::Form::Group β bestie edition π
okay so this is the manual page for CGI::Test::Form::Group, part of the User Contributed Perl Documentation, and it's basically the little clique-keeper for box-type widgets. let's get into it β¨
πΈ NAME πΈ
CGI::Test::Form::Group β it records groups of box-type widgets, no cap π
π¦ SYNOPSIS π¦
like, imagine you have a form and you wanna poke at the radio groups:
# $form is a CGI::Test::Form object
use CGI::Test;
my $rgroup = $form->radio_groups;
ok 1, defined $rgroup;
my @title = $rgroup->widgets_in("title");
my ($mister) = grep { $_->value eq "Mr" } @title;
ok 2, $mister->is_checked;
see how easy that is?? iconic behavior fr fr π
β¨ DESCRIPTION β¨
so this class is literally just a container for box-type widgets β that means radio buttons and checkboxes β and those widgets may be groupped by name. (yes, "groupped", that's the word the docs use, we respect it π«Ά)
you can query it to grab widgets that belong to a group, or to get all the group names. super handy.
and plot twist: CGI::Test uses it internally too, to keep track of associated radio buttons, so that checking one of them automatically unchecks the others in the same group. the way that works is honestly so satisfying, main character energy π₯
π INTERFACE π
here's everything that's available to you, bestie:
is_groupnamename β checks whether name is the name of a group. yes/no, simple as that βnamesβ returns a list of group names, in random order. like, don't @ me about the order, it's random, that's the vibe π²widget_countgroupname β returns the amount of widgets held in groupname, and0if there are none. not zero yet, just zero πwidgets_ingroupname β returns a list of all the widgets in the given groupname. and heads up: if the name is not a valid group name, the list will be empty. no error, no drama, just an empty list π
π AUTHORS π
- the original author is Raphael Manfredi β
- Steven Hilton was long time maintainer of this module π
- current maintainer is Alexander Tokarev
<tokarev@cpan.org>π
π§ SEE ALSO π§
and that's the whole page, bestie π
this was perl v5.34.0, dated 2022-06-10, served up from the User Contributed Perl Documentation section 3pm. mwah, go forth and group your widgets πβ¨π
π¦ 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