Xcruciate::UnitConfig - OO API for reading xacerbate/xteriorize unit config files.
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.
Mark Howe, <email@example.com>
Creates and returns an Xcruciate::UnitConfig object which can then be queried. If the optional verbose argument is perlishly true it will show its working to STDOUT. If the stop_only argument is perlishly true it will only bother about the information needed to stop processes (ie hosts and ports).
By default 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. If the fourth argument (lax) is perlishly true, errors will be signalled but the possibly broken object will be created anyway. This is useful behaviour for development purposes, especially when changing config options, but should not be used in a production setting. Note that even the lax version of new() will die if the config file does not look anything like a config file.
Returns multi-lined human-friendly description of the xac config file
Returns the ip range from which connections are accepted.
Returns the path to the access log.
Returns the path to which the backup zip file should be written.
Returns the path to the boot log.
Returns the number of ticks per chime
Returns the path to the directory containing clean versions of modifiable files.
Returns the type of config file, which in this case should always be 'unit'.
Returns the path to the directory containing current versions of modifiable files.
Returns the xacerbate debug level.
Returns the path to the xacerbate debug log.
Returns the entry called name. Lists will be returned by reference. Use named methods in preference to this one where possible.
Returns the path to the xacerbate error log.
Returns a list of locations to which xacerbate application code can write logs.
Returns the maximum buffer size allowed for any one connection.
Returns the maximum number of connections accepted by xacerbate.
Returns the maximum character length of each XML document.
Returns a list of modifiable data filenames.
Returns a list of modifiable XSL filenames.
Returns the path that is prefixed by xacerbate to various other settings.
Returns the number of chimes per peel.
Returns the port used by xacerbate.
Returns a list of modifiable files that should persist from session to session, ie they are not overwritten from clean on startup.
Expects an absolute or relative path. If the path is relative, and if there was a path entry in the config file, the path entry is prepended to the relative path. Otherwise the supplied path is returned unchanged.
Returns the address on which xacerbate listens.
Returns start_xte value (true or false), ie whether xteriorize should be started alongside xacerbate.
Returns a list of startup command filenames.
Returns the path to the startup command files.
Returns the interval between ticks (or twice the interval between a tick and a tock).
Returns the name of the main transform file used by xacerbate.
Returns a list of modifiable files that should persist from session to session, even when xcruciate is reset (they will still be reinitialised by a factory reset).
Returns the time limit after which captchas time out
Returns a list of site-specific castes, in ascending order of rights.
Returns the time limit after which confirmation codes time out.
Returns a list of date formats.
Returns a list of datetime formats.
Returns a flag signifying whether, by default, users accept contact via email.
Returns a flag signifying whether, by default, users accept contact via pm.
Returns the number of failed logins after which an account will be locked.
Returns the time delay after which a locked account will be unlocked.
Returns the url of the site favicon (either a fully-qualified url or a local, absolute url).
Returns the email address used for outgoing mail.
Returns the timeout for Xteriorize gateways authenticating with Xcathedra.
Returns the website domain.
Returns a flag signifying whether manual admin approval of new user accounts is currently activated.
Returns the path to the directory containing xcathedra (if defined).
Returns the path to the site-specific template for user profiles.
Returns the minimum caste which will see extended script error diagnostics.
Returns the delay after which a session will time out.
Returns the path to the directory containing the site-specific files.
Returns the default time zone offset.
Returns a flag signifying whether each user must use a unique email to register.
Returns a list of hex bytes (00 to FF) to be used to construct captcha background RGB values.
Returns a list of hex bytes (00 to FF) to be used to construct captcha foreground RGB values.
Returns the pixel height of captchas.
Returns the maximum angle by which TrueType text will be rotated in a captcha.
Returns the maximum thickness of captcha lines.
Returns the maximum number of lines to draw on a captcha.
Returns the minimum line thickness to use in captchas.
Returns the minimum number of lines to draw on a captcha.
Returns the number of particles to add to a captcha.
Returns the size of particles added to a captcha.
Returns a list of GD:SecurityImage captcha styles.
Returns the point size for TrueType captcha text.
Returns a list of TrueType fonts for captchas.
Returns the pixel width of captchas.
Returns the xte_check_for_waiting value (time to wait before revising number of child processes).
Returns a list of allowed ip ranges for xteriorize
Returns a list of denied ip ranges for xteriorize
Returns the docroot used by xteriorize.
Returns true if captcha serving is enabled.
Returns true if is email sending is enabled.
Returns true if is writing and deleting files is enabled.
Returns true if PDF output via Apache FOP is enabled.
Returns true if output via XML::GenericJSON is enabled.
Returns true if output via the Flex 3 compiler mxmlc is enabled.
Returns true if direct static file serving (ie without xacerbate) is enabled.
Returns true if HTTP file uploading is enabled.
Returns true if PDF output via xmlroff is enabled.
Returns the from address for emails sent by xteriorize
Returns the from code expected by xacerbate to authorize gateway connections.
Returns the un*x group to use for xteriorize child processes. May be undefined.
Returns a list of i18n files.
Returns a list of sizes (eg 123x456) to which images will be scaled/cropped.
Returns the path to the xte log file.
Returns the xteriorize log level.
Returns the maximum dimensions (eg 123x456) beyond which an uploaded image will be cropped.
Returns the Net::Prefork max_servers value for xteriorize.
Returns the Net::Prefork max_requests value for xteriorize.
Returns the Net::Prefork max_spare_servers value for xteriorize.
Returns the maximum permitted size in kb of file uploads.
Returns the path to the mimetype lookup table for direct static file serving.
Returns the Net::Prefork min_servers value for xteriorize.
Returns the Net::Prefork min_spare_servers value for xteriorize.
Returns the port used by xteriorize.
Returns the maximum character size of an http request received by xteriorize.
Returns true if timings for various aspects of Xcruciate processing are being output.
Returns the ip on which xteriorize will listen.
Returns the site language in 2-character format.
Returns the charset used for smtp by xteriorize.
Returns the encoding used for smtp by xteriorize.
Returns the host used for smtp by xteriorize.
Returns the port used for smtp by xteriorize.
Returns true if xte_splurge_input is enabled (copies XML sent from xteriorize to xacerbate to STDERR).
Returns true if xte_splurge_output is enabled (copies XML sent from xacerbate to xteriorize to STDERR).
Returns a list of directories under docroot from which files will be served directly by Xteriorized.
Returns a directory to be used for temporary files, eg for output filters
Returns the un*x user to use for xteriorize child processes. May be undefined.
Returns a flag according to whether or not xcathedra is used.
Returns the delay for a response to xteriorize by xacerbate, after which xteriorize will issue a 504 ('gateway time-out') error.
Function for croaking
The best way to report bugs is via the Xcruciate bugzilla site (http://www.xcruciate.co.uk/bugzilla).
0.01: First upload
0.03: First upload including module
0.04: Changed minimum perl version to 5.8.8
0.05: Added debug_list data type. Warn about unknown entries
0.06: Added stop_only option to new(), added some comments
0.07: Revised config file entry names. Check server_ip as well as port on start/stop. Attempt to put all Xcruciate modules in one PAUSE tarball.
0.08: Added xte_temporary_file_path. Added lax option to proceed despite config errors.
0.09: Use Carp for errors.
0.10: Prepend path entry to relative paths
0.11: Remove transform_xsl_path
0.12: Resolve modifiable file paths, attempt to parse XML and XSLT files
0.14: Global update
0.15: Added xte_splurge_output
0.16: Added support for xca entries. Added very_persistent_modifiable_files and xte_i18n_files. Distinquish warnings and errors in output.
0.17: use warnings.
0.18: Removed xca_time_display_function. Made v0.16 additions optional. Added nine new xca entries. Added new types to file format reporting.
0.19: Use duration type for durations. Added xca_gateway_authenticate_timeout (previously a global in Xcathedra code). Got name of xte_use_xca right. Got missing xca entry testing in right loop.
0.20: Added backup_path, xte_site_language, xte captcha entries and xte_enable entries, xca_image_sizes entries.
Copyright (C) 2007 - 2009 by SARL Cyberporte/Menteith Consulting
This library is distributed under the BSD licence (http://www.xcruciate.co.uk/licence-code).