CfgTie::CfgArgs -- Configuration module for parsing commandline arguments
CfgTie::CfgArgs
This module is meant to help create useful configuration tools and utilities.
A tool to allow many of your computer's subsystems to be configured. This module parses commandline arguments. It is provided to help create a standardized lexicon.
To specify how much of your system should be affected by the change in settings:
--scope=session|application|user|group|system
In addition, each of the individual parts can specified (instead of their defaults):
--application=
--application
This specifies the application.
--user=
--user
This specifies the user name.
--group=
--group
This specifies the group name.
The specific operation to be done:
--op=set|unset|remove|delete|exists|fetch|get|copy|rename
or:
--copy name1=name2 name3=name4 ... --exists name1 name2 name3 ... --test name1=value1 name2=value2 ... --unset name1 name2 ...
--delete
--delete=
This will remove the entry specified by NAME. NAME may be a regular expression.
--fetch
--fetch=
This will retrieve the information associated with NAME. If NAME is a regular expression, information will retrieved for every entry that matches the pattern.
--remove
--remove=
Like delete above, this will remove the entry specified by NAME. NAME may be a regular expression.
delete
--rename
This will change all of the occurrences or references that match NAME-OLD to the newer form of NAME-NEW. This may be a regular expression, similar to;
s/NAME-OLD/NAME-NEW/
--set
This will create an entry called NAME with a setting of VALUE.
The variable names are optional, and can be explicitly specified:
--name
Otherwise it is assumed to be the first no flag parameter.
Similarly, the value can be specified
--value
--file
--file=
This specifies the configuration file to employ. If none is specified, the default for the particular subsystem will be used instead.
--comment
--comment=
This provides a text comment on what changes are being made.
-n, --dry-run, --just-print --recon
With these flags, the utility program should not modify any files. Instead, it should merely document what changes it would make, what programs it would run, etc.
--copyright --help --info --information --manual --verbose --version --warranty
If the operation exists the return value is zero, otherwise it is nonzero.
The hash return:
{ SCOPE=> session,application,user,group,system OP => COPY, RENAME, STORE, DELETE, FETCH, or EXISTS KEY => VALUE=> }
Randall Maas (mailto:randym@acm.org, http://www.hamline.edu/~rcmaas/)
To install Secure::File, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Secure::File
CPAN shell
perl -MCPAN -e shell install Secure::File
For more information on module installation, please visit the detailed CPAN module installation guide.