paramorama - a tool to parse / write Config::Param config files for other programs
script/paramorama [parameters] some.conf [parameters] [param names]
It parses the parameters defined in some.conf to act like the program the file is for when parsing command line parameters that might be following.
Any non-parameter words given after the config file are treated as parameter names to print out the values from. Note that the values are simply printed separated by single line breaks. If parameter values can contain line breaks themselves, the output of multiple parameters is ambiguous. Hash and array parameters are printed one element/pair per line (name=value for hashes). Here, too, line breaks complicate things but the mechanism is useful enough when avoiding such data. For the full deal, you can print and parse the configuration file.
Empty scalars will trigger one empty line of output, empty arrays will trigger _no_ lines of output.
These are the general rules for specifying parameters to this program:
paramorama -s -xyz -s=value --long --long=value [--] [files/stuff]
You mention the parameters/switches you want to change in any order or even multiple times (they are processed in the oder given, later operations overriding/extending earlier settings. An only mentioned short/long name (no "=value") means setting to 1, which is true in the logical sense. Also, prepending + instead of the usual - negates this, setting the value to 0 (false). Specifying "-s" and "--long" is the same as "-s=1" and "--long=1", while "+s" and "++long" is the sames as "-s=0" and "--long=0".
There are also different operators than just "=" available, notably ".=", "+=", "-=", "*=" and "/=" for concatenation / appending array/hash elements and scalar arithmetic operations on the value. Arrays are appended to via "array.=element", hash elements are set via "hash.=name=value".
The available parameters are these, default values (in Perl-compatible syntax) at the time of generating this document following the long/short names:
print out absolute file paths
Which configfile(s) to use (overriding automatic search in likely paths); special: just -I or --config causes printing a current config file to STDOUT
show the help message; 1: normal help, >1: more help; "par": help for paramter "par" only
Additional fun with negative values, optionally followed by comma-separated list of parameter names: -1: list par names, -2: list one line per name, -3: -2 without builtins, -10: dump values (Perl style), -11: dump values (lines), -100: print POD.
print out list of included config files referenced from the given one (including the primary one)
print out the program version
Thomas Orgis <email@example.com>
Copyright (c) 2012 Thomas Orgis, Free Software licensed under the same terms as Perl 5.10