summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-08-31 12:33:55 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-08-31 12:33:55 +0000
commit0e15730b36718634d4ed8fb646e964544e4e4876 (patch)
tree4dad920a698a55ae93992e63e3981991d10db872
parentc35e9501b7a664e1f9664bf059696e5311e2886f (diff)
downloadurpmi-0e15730b36718634d4ed8fb646e964544e4e4876.tar
urpmi-0e15730b36718634d4ed8fb646e964544e4e4876.tar.gz
urpmi-0e15730b36718634d4ed8fb646e964544e4e4876.tar.bz2
urpmi-0e15730b36718634d4ed8fb646e964544e4e4876.tar.xz
urpmi-0e15730b36718634d4ed8fb646e964544e4e4876.zip
Turn off utf8 warnings in the caller each time we use urpm::msg.
-rw-r--r--urpm.pm3
-rw-r--r--urpm/msg.pm10
2 files changed, 10 insertions, 3 deletions
diff --git a/urpm.pm b/urpm.pm
index 5cfd24b8..95bc53d5 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -23,9 +23,6 @@ BEGIN {
if ($ENV{DEBUG_URPMI}) {
require encoding::warnings;
encoding::warnings->import;
- } else {
- require warnings;
- warnings->unimport('utf8');
}
}
diff --git a/urpm/msg.pm b/urpm/msg.pm
index 5f60a070..28e3438d 100644
--- a/urpm/msg.pm
+++ b/urpm/msg.pm
@@ -1,6 +1,7 @@
package urpm::msg;
use strict;
+no warnings;
use Exporter;
our @ISA = 'Exporter';
our @EXPORT = qw(N log_it to_utf8 message_input message toMb from_utf8);
@@ -27,6 +28,15 @@ sub from_utf8_dummy { $_[0] }
*from_utf8 = defined $codeset ? *from_utf8_full : *from_utf8_dummy;
+sub import {
+ urpm::msg->export_to_level(1, @_);
+ unless ($ENV{DEBUG_URPMI}) {
+ #- turn off warnings utf8 in caller. Kludge. Find better way later
+ @_ = qw(utf8);
+ goto &warnings::unimport;
+ }
+}
+
sub N {
my ($format, @params) = @_;
my $s = sprintf(