Zoidberg::Utils::Output - Zoidberg output routines
use Zoidberg::Utils qw/:output/; # use this instead of perlfunc print output "get some string outputted"; output { string => 'or some data struct dumped' };
This module provides some routines used by various Zoidberg modules to output data.
Although when working within the Zoidberg framework this module should be used through the Zoidberg::Utils interface, it also can be used on it's own.
By default all of the below except typed_output.
typed_output
output(@_)
Output a list of possibly mixed data structs as nice as possible.
A reference to an array of plain scalars may be outputted as a multicolumn list, more complex data will be dumped using Data::Dumper.
message(@_)
Like output() but tags data as a message, in non-interactive mode these may not be printed at all.
output()
debug(@_)
Like output() tags the data as debug output, will only be printed when in debug mode. Debug ouput will be printed to STDERR if printed at all.
complain(@_)
Like output but intended for error messages, data will be printed to STDERR. Has some glue for error objects created by Zoidberg::Utils::Error. Prints $@ when no argument is given.
output
$@
typed_output($type, @_)
Method that can be used to define output types that don't fit in the above group. $type must be a plain string that is used as output 'tag'.
$type
output_is_captured($type, @_)
Method that returns a boolean that tells whether output is captured or not. This can be used to make terminal output different from data struct output.
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.
Zoidberg, Zoidberg::Utils
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.