2 # BioPerl module for wrapping runtime parameters
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
6 # Cared for by Chad Matsalla (bioinformatics1 at dieselwurks dot com)
8 # Copyright Chad Matsalla
10 # You may distribute this module under the same terms as perl itself
12 # POD documentation - main docs before the code
16 Bio::Tools::Run::GenericParameters - An object for the parameters used to run programs
20 my $void = $obj->set_parameter("parameter_name","parameter_value");
21 my $value = $obj->get_parameter("parameter_name");
25 This is a basic container to hold the parameters used to run a
26 program. This module may get incorporated into the more generic
27 Bio::Tools::Run framework in bioperl-run distribution.
33 User feedback is an integral part of the evolution of this and other
34 Bioperl modules. Send your comments and suggestions preferably to
35 the Bioperl mailing list. Your participation is much appreciated.
37 bioperl-l@bioperl.org - General discussion
38 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
42 Please direct usage questions or support issues to the mailing list:
44 I<bioperl-l@bioperl.org>
46 rather than to the module maintainer directly. Many experienced and
47 reponsive experts will be able look at the problem and quickly
48 address it. Please include a thorough description of the problem
49 with code and data examples if at all possible.
53 Report bugs to the Bioperl bug tracking system to help us keep track
54 of the bugs and their resolution. Bug reports can be submitted via the
57 https://github.com/bioperl/bioperl-live/issues
59 =head1 AUTHOR - Chad Matsalla
61 Email bioinformatics1 at dieselwurks dot com
65 Sendu Bala, bix@sendu.me.uk
69 The rest of the documentation details each of the object methods.
70 Internal methods are usually preceded with a _
74 # Let the code begin...
76 package Bio
::Tools
::Run
::GenericParameters
;
79 use base
qw(Bio::Root::Root Bio::Tools::Run::ParametersI);
82 my ($class, @args) = @_;
83 my $self = $class->SUPER::new
(@args);
90 Usage : $parameter_object->get_parameter($param_name);
91 Function: Get the value of a parameter named $param_name
92 Returns : A scalar that should be a string
93 Args : A scalar that should be a string
99 return $self->{params
}->{$arg};
104 Title : set_parameter
105 Usage : $parameter_object->set_parameter($param_name => $param_value);
106 Function: Set the value of a parameter named $param_name to $param_value
108 Args : A hash containing name=>value pairs
113 my ($self,$name,$value) = @_;
114 $self->{params
}->{$name} = $value;
117 =head2 available_parameters
119 Title : available_parameters
120 Usage : my @paramnames = $parameter_object->available_parameters
121 Function: Returns the names of the available parameters
122 Returns : list of available parameter names
127 sub available_parameters
{
129 return keys %{$self->{params
}};