Mixin:...::Param(3pm)
β¨ NAME β¨
okay bestie, this is Mixin::ExtraFields::Param π β it's the module that makes your class hand out a param method, you know, the familiar one everybody already knows and loves. iykyk π
oh also? this page lives in the User Contributed Perl Documentation section, section 3pm, so if you were wondering where to find it: right here π«Ά
πΈ VERSION πΈ
this is version 0.022 β¨
π¦ SYNOPSIS π¦
like, literally, here's the whole vibe:
package Widget::Parametric;
use Mixin::ExtraFields::Param -fields => { driver => 'HashGuts' };;
...
my $widget = Widget::Parametric->new({ flavor => 'vanilla' });
printf "%s: %s\n", $_, $widget->param($_) for $widget->param;
periodt π
(yes the ;; is real, don't @ me, copy it exactly π)
π DESCRIPTION π
so what this module does is it mixes in to your class and gives you a param method β the same kind of param that CGI, CGI::Application, and all those other classes be handing out. iconic behavior, honestly π
under the hood it uses Mixin::ExtraFields, which means it can use any Mixin::ExtraFields driver to store your data. any of them. the whole roster. main character energy π
by default, the methods you get are:
paramexists_paramdelete_param
these methods get imported by the "fields" group, and heads up bestie β that group must be requested. you don't just get it for free, you have to ask. ask nicely tho π
and if you pass a "moniker" argument? then the moniker gets used instead of param. so you can call it whatever you want, it's giving customizable β¨
for more info, go peek at Mixin::ExtraFields π
π PERL VERSION π
okay so, this library should run on perls released even a long time ago. like, it should work on any version of perl released in the last five years. slay π
but β and this is the fine print bestie β even though it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. the version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl.
so like. don't come for her about the floor, okay? π
π METHODS π
π« param
my @params = $object->param; # get names of existing params
my $value = $object->param('name'); # get value of a param
my $value = $object->param(name => $value); # set a param's value
my @values = $object->param(n1 => $v1, n2 => $v2, ...); # set many values
this method sets or retrieves parameters. that's it, that's the whole job, and she does it flawlessly π«Ά
π AUTHOR π
Ricardo SIGNES <cpan@semiotic.systems>
π CONTRIBUTORS π
- Ricardo SIGNES <rjbs@codesimply.com>
- Ricardo Signes <rjbs@semiotic.systems>
(the icon himself, twice, with two different emails β we love a dedicated king π)
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2005 by Ricardo SIGNES.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
and that's the whole page bestie π this was Mixin:...::Param(3pm), straight out of perl v5.36.0, dated 2023-01-07 β mwah, go write something iconic with it π
β¨π¦
π¦ where this page comes from
- debian bookworm: libmixin-extrafields-param-perl 0.022-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libmixin-extrafields-param-perl 0.022-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libmixin-extrafields-param-perl 0.022-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libmixin-extrafields-param-perl 0.022-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmixin-extrafields-param-perl 0.022-1 Β· 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