Xcruciate::Utils - Utilities for Xcruciate
check_path('A very nice path',$path,'rw');
Provides utility functions Xcruciate ( http://www.xcruciate.co.uk).
Mark Howe, <firstname.lastname@example.org>
Checks that the path exists, and that it has the appropriate permissions, where permissions contains some combination of r, w and x. If not, and if non_fatal is perlishly false, it dies, using the value of option to produce a semi-intelligable error message. If non_fatal is perlishly true it returns the error or an empty string.
A lot like &check_path (which it calls), but also checks that the path is absolute (ie is starts with a /).
Returns errors on typechecking value against record. Name is provided for error messages. Path is from config file.
Check an XML or XSLT file
Attempts to parse a file as XSLT 1.0 and returns an error in case of failure (ie false means 'no error').
Produces an apache-style timestamp from an epoch time.
Converts GMT epoch time to the format expected by XSLT date functions.
Converts an XML Schema duration into seconds (Month and Year must be zero or absent for compatibility with EXSLT's date:seconds().
Returns XML describing the contents of $docroot_path.
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 containing module
0.04: Changed minimum perl version to 5.8.8
0.05: Added debug_list data type, fixed uninitialised variable error when numbers aren't.
0.07: Attempt to put all Xcruciate modules in one PAUSE tarball.
0.08: Added index_docroot (previously inline code in xcruciate script)
0.09: Fixed typo in error message. Use Carp for errors. Non-fatal option for check_path()
0.10: Prepend path entry to relative paths
0.12: Resolve modifiable file paths, attempt to parse XML and XSLT files
0.13: Do not attempt to parse XSLT as part of config file validation (because modifiable XSLT files will not be in place for a clean install). Add explicit function to test XSLT later.
0.14: Add doc-write to permissible debug options.
0.15: Dot optional in number data type. Remove last line of XSLT parse errors.
0.16: Integers acceptable where float requested. Added duration data type.
0.17: use warnings.
0.18: dateformat, url and timeoffset data types.
0.19: duration_in_seconds(). Better duration type checking.
0.20: Example durations in error message now legal durations. Added hexbyte, captchastyle and imagesize types.
Copyright (C) 2007 - 2009 by SARL Cyberporte/Menteith Consulting
This library is distributed under BSD licence (http://www.xcruciate.co.uk/licence-code).