ActiveState::Handy - Collection of small utility functions
use ActiveState::Handy qw(add); my $sum = add(1, 2, 3);
This module provides a collection of small utility functions.
The following functions are provided:
Adds the given arguments together.
Returns the content of a file. Same as file_content( $filename ). This function is still present for legacy reasons.
Just like cat() but will read the file in text mode. Makes a difference on some platforms (like Windows).
Rounds the number up to the nearest integer. Same as POSIX::ceil().
Copies files from source to destination directory. Destination directory will be created if it doesn't exist. Function dies if any file cannot be found.
Recursively copies all files and subdirectories from source to destination directory. All destination directories will be created if they don't already exist.
Get or set the content of a file. The file I/O takes place in binary mode.
If called with a single argument, then try to read the given file and return
undef if the file could not be opened.
If called with two arguments, try to write the given $content to the file denoted by the given $filename, creating the file itself or missing directories as needed. If the file can't be opened or created this function will croak. There is no return value when the file is set.
Returns a ISO 8601 formatted date; YYYY-MM-DD format. See
Returns a ISO 8601 formatted timestamp; YYYY-MM-DDThh:mm:ss format. See
Will escape a piece of text so it can be embedded as text in an XML element.
Will remove control characters so it can be embedded as text in an XML element. Does not perform escaping.
printf-style template expansion compatible with the String::Format module.
For legacy reasons this module re-exports the functions run(), shell_quote() and decode_status() from