Create new options hash. Pass it a hash ref to start with. Please note that this reference
is copied, not blessed.
Creates a clone of options object.
This is a utility function for accessing options. If passed a hashref, merges it.
If passed a scalar, returns the value. If passed two scalars, sets the option.
Takes a hashref as argument and merges with current options.
Same as merge, except when a value is a hash or array reference. For example:
The above outputs:
This is used to store options to a file. The file is actually a perl program that
returns a hash. By default uses option optionfile as filename, or value passed as argument.
If optionfile is an array, then uses LAST option in array as default.
This is used to retreive options from a file. The optionfile is actually a perl program that
returns a hash. By default uses option optionfile as filename if none is passed.
If optionfile is an array, reads all option files in order.
Non-existant files are ignored.
Please note that values for this are cached.
Takes a scalar as argument and evals it, then merges option. If second option is given uses this in error message if the eval fails.
Output optons hash as a scalar using Data::Dumper.
|del($key)||Removes $key from options.|
Deepmerge does a poor job at recogniaing recursive loops. For example, $options->deepmerge($options) will really screw things up. As protection, will only loop 20 deep. fromfile_perl provides tainted data. Since it comes from an external file, the data is considered tainted.
This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License, distributed with Perl.
Copyright (c) 2007 Edward Allen III. Some rights reserved.
|perl v5.20.3||CONFIG::OPTIONS (3)||2008-02-20|