NAME
Xcruciate::UnitConfig - OO API for reading xacerbate/xteriorize unit config files.
SYNOPSIS
my $config=Xcruciate::UnitConfig->new('unit.conf');
my $cm=$config->chime_multiplier;
my @mdf=$config->modifiable_data_files;
DESCRIPTION
Xcruciate::UnitConfig is part of the Xcruciate project (http://www.xcruciate.co.uk). It provides an OO interface to an xacerbate/xteriorize unit configuration file.
Accessor functions return scalars for <scalar/> entry types and lists for <list/> entry types. The values returned are those found in the config file, with the exception of yes_no datatypes which are converted into perlish boolean values (1 or 0).
All xte*() methods will return an undefined value unless the xte_start entry is set.
The entry() method can be used to access any entry including unofficial extensions. However, it is safer to use the named methods where possible, to avoid inventing unofficial extensions through typos.
AUTHOR
Mark Howe, <melonman@cpan.org>
EXPORT
None
CREATOR METHODS
new(config_file_path [,verbose])
Creates and returns an Xcruciate::XcruciateConfig object which can then be queried. If the optional verbose argument is perlishly true it will show its working to STDOUT. At present it looks for configuration errors and die noisily if it finds any. This is useful behaviour for management scripts - continuing to set up server daemons on the basis of broken configurations is not best practice - but non-fatal error reporting could be provided if/when an application requires it.
UTILITY METHODS
xac_file_format_description()
Returns multi-lined human-friendly description of the xac config file
ACCESSOR METHODS
accept_from()
Returns the ip range from which connections are accepted.
access_log_path()
Returns the path to the access log.
boot_log_path()
Returns the path to the boot log.
chime_multiplier()
Returns the number of ticks per chime
clean_states_path()
Returns the path to the directory containing clean versions of modifiable files.
config_type()
Returns the type of config file, which in this case should always be 'unit'.
current_states_path()
Returns the path to the directory containing current versions of modifiable files.
debug_level()
Returns the xacerbate debug level.
debug_log_path()
Returns the path to the xacerbate debug log.
entry(name)
Returns the entry called name. Lists will be returned by reference. Use named methods in preference to this one where possible.
error_log_path()
Returns the path to the xacerbate error log.
listen_on()
Returns the address on which xacerbate listens.
log_file_paths()
Returns a list of locations to which xacerbate application code can write logs.
max_buffer_size()
Returns the maximum buffer size allowed for any one connection.
max_connections()
Returns the maximum number of connections accepted by xacerbate.
max_input_frequency()
Returns the maximum number of XML documents allowed per second and per connection.
max_input_length()
Returns the maximum character length of each XML document.
modifiable_data_files()
Returns a list of modifiable data filenames.
modifiable_transform_files()
Returns a list of modifiable XSL filenames.
outer_read_timeout()
Returns the maximum wait time for the xacerbate outer loop.
path()
Returns the path that is prefixed by xacerbate to various other settings.
peel_multiplier()
Returns the number of chimes per peel.
port()
Returns the port used by xacerbate.
persistent_modifiable_files()
Returns a list of modifiable files that should persist from session to session, ie they are not overwritten from clean on startup.
start_xte()
Returns start_xte value (true or false), ie whether xteriorize should be started alongside xacerbate.
startup_commands()
Returns a list of startup command filenames.
startup_files_path()
Returns the path to the startup command files.
tick_interval()
Returns the interval between ticks (or twice the interval between a tick and a tock).
transform_xsl()
Returns the name of the main transform file used by xacerbate.
transform_xsl_path()
Returns the path of the directory containing the main transform file used by xacerbate.
xca_path()
Returns the path to the directory containing xcathedra (if defined).
xca_time_display_function()
Returns the function used to turn XSLT-format timestamps into something readable.
xte_check_for_waiting()
Returns the xte_check_for_waiting value (time to wait before revising number of child processes).
xte_cidr_allow()
Returns a list of allowed ip ranges for xteriorize
xte_cidr_deny()
Returns a list of denied ip ranges for xteriorize
xte_docroot()
Returns the docroot used by xteriorize.
xte_enable_static_serving()
Returns true if direct static file serving (ie without xacerbate) is enabled.
xte_from_address()
Returns the from address for emails sent by xteriorize
xte_gateway_auth()
Returns the from code expected by xacerbate to authorize gateway connections.
xte_group()
Returns the un*x group to use for xteriorize child processes. May be undefined.
xte_host()
Returns the ip on which xteriorize will listen.
xte_log_file()
Returns the path to the xte log file.
xte_log_level()
Returns the xteriorize log level.
xte_max_servers()
Returns the Net::Prefork max_servers value for xteriorize.
xte_max_requests()
Returns the Net::Prefork max_requests value for xteriorize.
xte_max_spare_servers()
Returns the Net::Prefork max_spare_servers value for xteriorize.
xte_mimetype_path()
Returns the path to the mimetype lookup table for direct static file serving.
xte_min_servers()
Returns the Net::Prefork min_servers value for xteriorize.
xte_min_spare_servers()
Returns the Net::Prefork min_spare_servers value for xteriorize.
xte_port()
Returns the port used by xteriorize.
xte_post_max()
Returns the maximum character size of an http request received by xteriorize.
xte_smtp_charset()
Returns the charset used for smtp by xteriorize.
xte_smtp_encoding()
Returns the encoding used for smtp by xteriorize.
xte_smtp_host()
Returns the host used for smtp by xteriorize.
xte_smtp_port()
Returns the port used for smtp by xteriorize.
xte_splurge_input()
Returns true if xte_splurge_input is enabled (copies XML sent from xteriorize to xacerbate to STDERR).
xte_static_directories()
Returns a list of directories under docroot from which files will be served directly by Xteriorized.
xte_user()
Returns the un*x user to use for xteriorize child processes. May be undefined.
xte_xac_timeout()
Returns the delay for a response to xteriorize by xacerbate, after which xteriorize will issue a 504 ('gateway time-out') error.
BUGS
The best way to report bugs is via the Xcruciate bugzilla site (http://www.xcruciate.co.uk/bugzilla).
PREVIOUS VERSIONS
0.01: First upload
0.03: First upload including module
0.04 Changed minimum perl version to 5.8.8
COPYRIGHT AND LICENSE
Copyright (C) 2007 - 2009 by SARL Cyberporte/Menteith Consulting
This library is distributed under the BSD licence (http://www.xcruciate.co.uk/licence-code).