Debug::Message

Debug::Message is a Perl module that eases the use of debug print with level, indentation and color.
Download

Debug::Message Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • ondra
  • Publisher web site:
  • http://search.cpan.org/~atg/Debug-1.00/Debug/Message.pm

Debug::Message Tags


Debug::Message Description

Debug::Message is a Perl module that eases the use of debug print with level, indentation and color. Debug::Message is a Perl module that eases the use of debug print with level, indentation and color.SYNOPSIS use Debug::Message; use Log::Dispatch; use Log::Dispatch::Screen; my $dispatcher = Log::Dispatch->new; $dispatcher->add( Log::Dispatch::Screen->new( name => 'screen', min_level => '0' )); my $info = Debug::Message->new(1); $info->add_dispatcher($dispatcher); $info->print("print"); $info->yellow("warn"); $info->red("err"); $info->printcn("error message", 'bold red'); my $critical = Debug::Message->new(5); $critical->add_dispatcher($dispatcher); $critical->redn("err");For disabling the debugging simply do not attach any dispatchers. $critical->disable; # Will detach the attached backendThere was no module for simple debug messages supporting debug/verbosity levels and indentation. So this is the one, that is supposed to take this place.This module is an art of frontend to Log::Dispatch as Log::Dispatch itself supports levels, but no colors and the function's calling is tedious.There are some methods defined. Each outputs a different color, optionally it can add a newline after the messaage. They dispatch the messages to all added dispatchers, but generaly only one will be needed as the Log::Dispatch itself can have more backends.Requirements:· PerlWhat's New in This Release:· Some of the ideas evolved: Colors insted of semantics in function names.


Debug::Message Related Software