| Quizzer documentation | Contained in the Quizzer distribution. |
Quizzer::Log -- debconf log module
This is a log module for debconf. It can output messages at varying priorities.
This module uses Exporter.
Outputs an infomational message, if DEBCONF_DEBUG is set in the environment to a value >= the first parameter.
Outputs a warning message. This overrides the builtin perl warn() command.
Joey Hess <joey@kitenet.net>
| Quizzer documentation | Contained in the Quizzer distribution. |
#!/usr/bin/perl
package Quizzer::Log; use Exporter; use strict; use vars qw(@ISA @EXPORT_OK %EXPORT_TAGS); my $VERSION='0.01'; @ISA = qw(Exporter); @EXPORT_OK=qw(debug warn); # Import :all to get everything. %EXPORT_TAGS = (all => [@EXPORT_OK]);
sub debug { my $priority=shift; if (exists $ENV{DEBCONF_DEBUG} && $priority <= int($ENV{DEBCONF_DEBUG})) { print STDERR "debconf: ".join(" ", @_)."\n"; } }
sub warn { print STDERR "debconf: ".join(" ", @_)."\n"; }
1