Provided by: latexml_0.8.3-3_all
"LaTeXML::Common::Config" - Configuration logic for LaTeXML
use LaTeXML::Common::Config; my $config = LaTeXML::Common::Config->new( profile=>'name', timeout=>60, ... ); $config->read(\@ARGV); $config->check; my $value = $config->get($name); $config->set($name,$value); $config->delete($name); my $bool = $config->exists($name); my @keys = $config->keys; my $options_hashref = $config->options; my $config_clone = $config->clone;
Configuration management class for LaTeXML options. * Responsible for defining the options interface and parsing the usual Perl command-line options syntax * Provides the intuitive getters, setters, as well as hash methods for manipulating the option values. * Also supports cloning into new configuration objects. METHODS "my $config = LaTeXML::Common::Config->new(%options);" Creates a new configuration object. Note that you should try not to provide your own %options hash but rather create an empty configuration and use $config->read to read in the options. "$config->read(\@ARGV);" This is the main method for parsing in LaTeXML options. The input array should either be @ARGV, e.g. when the options were provided from the command line using the classic Getopt::Long syntax, or any other array reference that conforms to that setup. "$config->check;" Ensures that the configuration obeys the given profile and performs a set of assignments of meaningful defaults (when needed) and normalizations (for relative paths, etc). "my $value = $config->get($name);" Classic getter for the $value of an option $name. "$config->set($name,$value);" Classic setter for the $value of an option $name. "$config->delete($name);" Deletes option $name from the configuration. "my $bool = $config->exists($name);" Checks whether the key $name exists in the options hash of the configuration. Similarly to Perl's "exist" for hashes, it returns true even when the option's value is undefined. "my @keys = $config->keys;" Similar to "keys %hash" in Perl. Returns an array of all option names. "my $options_hashref = $config->options;" Returns the actual hash reference that holds all options within the configuration object. "my $config_clone = $config->clone;" Clones $config into a new LaTeXML::Common::Config object, $config_clone.
OPTIONS AND ARGUMENTS
Bruce Miller <firstname.lastname@example.org> Deyan Ginev <email@example.com>
Public domain software, produced as part of work done by the United States Government & not subject to copyright in the US.