From: Frank Lichtenheld Date: Fri, 29 Feb 2008 22:45:40 +0000 (+0100) Subject: Dpkg::Errorhandling: Add info function X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=788892b243f8e55b8a37434397dbfd9d29a7a72d;p=dpkg Dpkg::Errorhandling: Add info function * scripts/Dpkg/ErrorHandling.pm (info): New function that outputs to stdout. --- diff --git a/scripts/Dpkg/ErrorHandling.pm b/scripts/Dpkg/ErrorHandling.pm index 37f72b5d..8710abd9 100644 --- a/scripts/Dpkg/ErrorHandling.pm +++ b/scripts/Dpkg/ErrorHandling.pm @@ -5,7 +5,7 @@ use Dpkg::Gettext; use base qw(Exporter); our @EXPORT_OK = qw(warning warnerror error failure unknown syserr internerr - subprocerr usageerr syntaxerr report + subprocerr usageerr syntaxerr report info $warnable_error $quiet_warnings); our $warnable_error = 1; @@ -19,6 +19,11 @@ sub report(@) return "$progname: $type: $msg\n"; } +sub info($;@) +{ + print report(_g("info"), @_) if (!$quiet_warnings); +} + sub warning($;@) { warn report(_g("warning"), @_) if (!$quiet_warnings);