Pipeline::Base - base class for all classes in Pipeline distribution
use Pipeline::Base; $object = Pipeline::Base->new() $object->debug( 10 ); $object->emit("message");
Pipeline::Base is a class that provides a basic level of functionality for all classes in the Pipeline system. Most importantly it provides the construction and initialization of new objects.
Pipeline::Base
The new() method is a constructor that returns an instance of receiving class.
new()
init() is called by the constructor, new() and is passed all of its arguments in LIST.
init()
The debug() method gets and sets the debug state of the OBJECT. Setting it to a true value will cause messages sent to emit() to be printed to the terminal. If debug() is called as a class method it always will return true.
debug()
emit()
emit() is a debugging tool. It will cause the the SCALAR to be formatted and sent to the log() method if the current debugging level is set to a true value.
log()
The log() method will send SCALAR to STDERR by default. It performs no processing of SCALAR and merely sends its results to the error handle. To change your logging mechanism simply override this method in the class as you see fit.
James A. Duncan <jduncan@fotango.com>
To install Pipeline, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pipeline
CPAN shell
perl -MCPAN -e shell install Pipeline
For more information on module installation, please visit the detailed CPAN module installation guide.