Piper::Role::Logger - Role for logging and debugging in the Piper system
The role exists to support future subclassing and testing of the logging mechanism used by Piper.
This role requires the definition of the below methods, each of which will be provided the following arguments:
$segment # The pipeline segment calling the method $message # The message sent (a string) @items # Items that provide context to the message
This method is only called if the debug level of the segment is greater than zero.
This method should cause a die or croak. It will do so automatically if not done explicitly, though with an extremely generic and unhelpful message.
die
croak
This method is only called if either the verbosity or debug levels of the segment are greater than zero.
This method should issue a warning (such as warn or carp).
warn
carp
These methods should be used to determine the appropriate debug and verbosity levels for the logger. They honor the following environment variable overrides (if they exist) before falling back to the appropriate levels set by the given $segment:
$segment
PIPER_DEBUG PIPER_VERBOSE
version 0.05
Mary Ehlers <ehlers@cpan.org>
This software is Copyright (c) 2017 by Mary Ehlers.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
To install Piper, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Piper
CPAN shell
perl -MCPAN -e shell install Piper
For more information on module installation, please visit the detailed CPAN module installation guide.