Zoidberg::Utils.3pm

Langue: en

Version: 2006-02-19 (debian - 07/07/09)

Section: 3 (Bibliothèques de fonctions)

NAME

Zoidberg::Utils - An interface to zoid's utility libs

SYNOPSIS

TODO

DESCRIPTION

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.

EXPORT

By default the ':error' and ':output' tags are exported.

The following export tags are defined:

:error
Gives you "error", "bug", "todo", "complain"; the first 3 belong to Zoidberg::Utils::Error, the last to Zoidberg::Utils::Output.
:output
Gives you "output", "message" and "debug", all of which belong to Zoidberg::Utils::Output.
:fs
Gives you "path" and "list_dir", which belong to Zoidberg::Utils::FileSystem.

Also methods listen below can be requested for import.

METHODS

"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.

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.

AUTHOR

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.

SEE ALSO

Zoidberg, Zoidberg::Utils::Error, Zoidberg::Utils::Output, Zoidberg::Utils::FileSystem, Zoidberg::Utils::GetOpt