# # spec file for package perl-Debug-Simple # # Copyright (c) 2024 SUSE LLC # # 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 https://bugs.opensuse.org/ # %define cpan_name Debug-Simple Name: perl-Debug-Simple Version: 0.100.0 Release: 0 # 0.10 -> normalize -> 0.100.0 %define cpan_version 0.10 License: Artistic-1.0 OR GPL-1.0-or-later Summary: Very simple debugging statements URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/B/BE/BEHANW/%{cpan_name}-%{cpan_version}.tar.gz Source100: README.md BuildArch: noarch BuildRequires: perl BuildRequires: perl-macros Provides: perl(Debug::Simple) = %{version} %undefine __perllib_provides %{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