# # spec file for package perl-Debug-Simple (Version 0.10) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: perl-Debug-Simple Version: 0.10 Release: 1 License: GPL+ or Artistic %define cpan_name Debug-Simple Summary: Very simple debugging statements Url: http://search.cpan.org/dist/Debug-Simple/ Group: Development/Libraries/Perl Source: http://www.cpan.org/authors/id/B/BE/BEHANW/%{cpan_name}-%{version}.tar.gz BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(Test::More) Requires: perl(Test::More) %{perl_requires} %description This module 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