XAS::Utils - A Perl extension for the XAS environment
use XAS::Class version => '0.01', base => 'XAS::Base', utils => 'db2dt dt2db' ; printf("%s\n", dt2db($dt));
This module provides utility routines that can by loaded into your current namespace.
This routine will take a date format of YYYY-MM-DD HH:MM:SS and convert it into a DateTime object.
This routine will take a DateTime object and convert it into the following string: YYYY-MM-DD HH:MM:SS
Trim the whitespace from the beginning and end of a string.
Trim the whitespace from the end of a string.
Trim the whitespace from the beginning of a string.
Reduces multiple whitespace to a single space.
Run a cli command with timeout. Returns output from that command.
Decodes perls exit code of a cli process. Returns two items.
Example: my @output = spawn(-command => "ls -l"); my ($rc, $sig) = exitcode();
Become a daemon. This will set the process as a session lead, change to '/', clear the protection mask and redirect stdin, stdout and stderr to /dev/null.
This routine will walk a HOH and does a callback on the key/values that are found. It takes three named parameters:
The hashref of the HOH.
An arrayref of the key levels.
The routine to call with these parameters:
This routine takes a set of parameters formated like a ExtJS 4.1 request and generates a md5 hash value from them.
This routine will load and initialize a module. It takes one required parameter and one optinal parameter.
This routine will load a module.
The name of the module.
Kevin L. Esteb, <firstname.lastname@example.org>
Copyright (C) 2012 by Kevin L. Esteb
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.