Product Details

Debug::Simple 0.10

 

Advertisement


Debug::Simple is a Perl module which provides a very simple way to provide debug/verbose/warning messages. It is also trivially controlled via Getopt::Long.
Debug::Simple is a completely free software. You can free download and use it as long as you like.


 

Very simple debugging statements

Debug::Simple is a Perl module which provides a very simple way to provide debug/verbose/warning messages. It is also trivially controlled via Getopt::Long.The idea is to be able to put a bunch of debugging print statements throughout your code that you can enable or disable.debuglevels(\%OPT) debuglevels registers the hashref HASH as the place to read values used to control whether text is output to the screen or not. There are 4 values read from this hash: quiet, debug, verbose, and test. quiet If non-zero, this will repress all output from Debug::Simple debug This indicates the level of debug messages desired. A debug level of 4 prints all the debug messages from levels 1 to 4. verbose Like debug, this sets the level of verboseness. A verbose level of 3 prints all verbose messages from 1 to 3. test If non-zero, the code passed to test() will be printed to the screen instead of being executed.warning(STRING) warning prints the STRING to stdout in YELLOW unless the "quiet" level is non-zero (see debuglevels). STRING is prefaced with "Warning:".debug(LEVEL, STRING, [NAME => REF]) debug prints a debugging message to stdout as long as LEVEL is at or below the "debug" level. (see < debuglevels). The debug message is printed in BOLD. It starts with "Debug: ", then STRING, and then optionally uses Data::Dumper to dump a data structure referred to by REF. NAME is just a human readable name for REF passed to Data::Dumper.verbose(LEVEL, STRING) verbose prints STRING to stdout as long as LEVEL is at or below the "verbose" level. (see debuglevels).test(CODE) test executes CODE according to the "test" level. (see debuglevels). If the "test" level is non-zero the code is printed to stdout instead of being executed.SYNOPSIS use Debug::Simple; my %opt = (quiet = > 0, debug = > 4, verbose = > 1, test = > 0); Debug::Simple::debuglevels(\%opt); warning("This is a warning\m"); debug(1, "This is a level 3 debug message\n"); debug(2, "This is a level 2 debug message with a Dump", NAME => \%opt); verbose(1, "This is a verbose message\n"); test('print "test code"');

(512k) < 1 sec
(1Mb) < 1 sec
(2Mb) < 1 sec
(5Mb) < 1 sec
(10Mb) < 1 sec

User Reviews: DEBUG::SIMPLE 0.10
 * 
 * 
     
 * 
related terms
Related Software
Similar Download Catalog
 
a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | w | x | y | z