Zoidberg::Utils - An interface to zoid's utility libs
TODO
This module bundles common routines used by the Zoidberg object classes, especially the error and output routines.
It is intended as a bundle or cluster of several packages so it is easier to keep track of all utility methods.
By default the ':error' and ':output' tags are exported.
The following export tags are defined:
Gives you error, bug, todo, complain; the first 3 belong to Zoidberg::Utils::Error, the last to Zoidberg::Utils::Output.
error
bug
todo
complain
Gives you output, message and debug, all of which belong to Zoidberg::Utils::Output.
output
message
debug
Gives you path and list_dir, which belong to Zoidberg::Utils::FileSystem.
path
list_dir
Also methods listen below can be requested for import.
read_data_file($basename)
Searches in zoid's data dirs for a file with basename $basename and returns a hash reference with it's contents.
$basename
This method should be used by all plugins etc. to ensure portability.
FIXME more explanation
read_file($file)
Returns a hash reference with the contents of $file. Currently only perl scripts are read and these should return (or end with) a hash reference. Possibly other formats like yaml will be added later.
$file
Jaap Karssenberg || Pardus [Larus] <pardus@cpan.org>
Copyright (c) 2003 Jaap G Karssenberg. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The import function was adapted from Exporter::Tidy by Juerd Waalboer <juerd@cpan.org>, it was modified to add the clustering feature.
Zoidberg, Zoidberg::Utils::Error, Zoidberg::Utils::Output, Zoidberg::Utils::FileSystem, Zoidberg::Utils::GetOpt
To install Zoidberg, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Zoidberg
CPAN shell
perl -MCPAN -e shell install Zoidberg
For more information on module installation, please visit the detailed CPAN module installation guide.