-
-
22 Jan 2014 03:13:08 UTC
- Distribution: Mixin-ExtraFields-Param
- Module version: 0.021
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (0)
- Testers (1247 / 0 / 0)
- Kwalitee
Bus factor: 1- 93.59% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (13.86KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
NAME
Mixin::ExtraFields::Param - make your class provide a familiar "param" method
VERSION
version 0.021
SYNOPSIS
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;
DESCRIPTION
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 amoniker
argument is supplied, the moniker is used instead of "param". For more information, see Mixin::ExtraFields.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.
AUTHOR
Ricardo SIGNES <rjbs@cpan.org>
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.
Module Install Instructions
To install Mixin::ExtraFields::Param, copy and paste the appropriate command in to your terminal.
cpanm Mixin::ExtraFields::Param
perl -MCPAN -e shell install Mixin::ExtraFields::Param
For more information on module installation, please visit the detailed CPAN module installation guide.