Interface::Param - Virtual class for param() method
This virtual class allows you to specify that your object implements a param() method which allows storing and retrieving data quickly through an interface that is similar to CGI.pm's param() method. It enforces the calling convention of the param() method, but it does not attempt to impose any type of storage system for the key/value pairs.
See Interface::Param::Hash for a useful subclass that implements the virtual methods of this interface.
This is the core of the Interface::Param package.
A name to store the data under
If no arguments are given, param_get() will be called with no arguments.
If a single scalar argument is passed that isn't a reference, param_get() will be called with the argument and field name sent.
If multiple arguments are given, or a single argument that is a reference, the data will be unwrapped and merged into a hash using conventional means (ie, a hashref will be dereferenced, and a list will be slurped as (key1,value1,...,keyN,valueN); however, array references are treated as a special case. They are mapped with each element being both the key and the value.
If called with no arguments, the typical response is to return a list of all keys. If called with one or more arguments, the values corresponding to those keys are returned.
Should stores the data received from the input hash. Returns the keys set.
If called with no arguments, delete all data stored for $field. If called with one or more arguments, delete the values stored for those particular keys.
Shaun Guth <l8nite@l8nite.net>
Copyright (C) 2004 Shaun Guth
This program is free software; you can redistribute it and/or modify it under the same terms as perl itself.
To install Interface::Param, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Interface::Param
CPAN shell
perl -MCPAN -e shell install Interface::Param
For more information on module installation, please visit the detailed CPAN module installation guide.