Mixin::ExtraFields::Param(3pm)

Mixin::ExtraFields::Param3pm

Make your class provide a familiar "param" method

Usage

  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;

Version

version 0.022

Overview

This module mixes in to your class to provide a "param" method like the ones provided by CGI, CGI::Application, and other classes. It uses Mixin::ExtraFields, which means it can use any Mixin::ExtraFields driver to store your data.

By default, the methods provided are:

•

param

•

exists_param

•

delete_param

These methods are imported by the "fields" group, which must be requested. If a "moniker" argument is supplied, the moniker is used instead of "param". For more information, see Mixin::ExtraFields.

Perl version

This library should run on perls released even a long time ago. It should work on any version of perl released in the last five years.

Although 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.

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.

Contributors

•

Ricardo SIGNES <[email protected]>

•

Ricardo Signes <[email protected]>

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 3 times.

  1. 6.0–7
  2. 8–10
  3. 11
  4. 12–13

Author

Ricardo SIGNES <[email protected]>

From libmixin-extrafields-param-perl 0.022-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.