summaryrefslogtreecommitdiffstats
path: root/urpm/msg.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-11-03 13:34:29 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-11-03 13:34:29 +0000
commit91d1d5e40d3ba242573012a093e8b5cc1e7c5bc4 (patch)
tree4414c5721935b629d82eca700270194e71de0f46 /urpm/msg.pm
parentc00ac473861f824abb28efd94645276893868bb6 (diff)
downloadurpmi-91d1d5e40d3ba242573012a093e8b5cc1e7c5bc4.tar
urpmi-91d1d5e40d3ba242573012a093e8b5cc1e7c5bc4.tar.gz
urpmi-91d1d5e40d3ba242573012a093e8b5cc1e7c5bc4.tar.bz2
urpmi-91d1d5e40d3ba242573012a093e8b5cc1e7c5bc4.tar.xz
urpmi-91d1d5e40d3ba242573012a093e8b5cc1e7c5bc4.zip
perl_checker compliance
Diffstat (limited to 'urpm/msg.pm')
-rw-r--r--urpm/msg.pm18
1 files changed, 9 insertions, 9 deletions
diff --git a/urpm/msg.pm b/urpm/msg.pm
index e3986abe..2944f85c 100644
--- a/urpm/msg.pm
+++ b/urpm/msg.pm
@@ -6,7 +6,7 @@ use strict;
no warnings;
use Exporter;
-(our $VERSION) = q$Revision$ =~ /(\d+)/;
+(our $VERSION) = q($Revision$) =~ /(\d+)/;
our @ISA = 'Exporter';
our @EXPORT = qw(N bug_log to_utf8 message_input toMb from_utf8 sys_log);
@@ -33,7 +33,7 @@ sub from_utf8_dummy { $_[0] }
our $use_utf8_full = defined $codeset && $codeset eq 'UTF-8';
-*from_utf8 = $use_utf8_full ? *from_utf8_full : *from_utf8_dummy;
+sub from_utf8 { $use_utf8_full ? &from_utf8_full : &from_utf8_dummy }
sub N {
my ($format, @params) = @_;
@@ -71,23 +71,23 @@ sub bug_log {
sub to_utf8 { Locale::gettext::iconv($_[0], undef, "UTF-8") }
sub message_input {
- my ($msg, $default_input, %opts) = @_;
+ my ($msg, $o_default_input, %o_opts) = @_;
my $input;
while (1) {
print $msg;
- if ($default_input) {
- $urpm::args::options{bug} and bug_log($default_input);
- return $default_input;
+ if ($o_default_input) {
+ $urpm::args::options{bug} and bug_log($o_default_input);
+ return $o_default_input;
}
$input = <STDIN>;
defined $input or return undef;
chomp $input;
$urpm::args::options{bug} and bug_log($input);
- if ($opts{boolean}) {
+ if ($o_opts{boolean}) {
$input =~ /^[$noexpr$yesexpr]?$/ and last;
- } elsif ($opts{range}) {
+ } elsif ($o_opts{range}) {
$input eq "" and $input = 1; #- defaults to first choice
- (defined $opts{range_min} ? $opts{range_min} : 1) <= $input && $input <= $opts{range} and last;
+ (defined $o_opts{range_min} ? $o_opts{range_min} : 1) <= $input && $input <= $o_opts{range} and last;
} else {
last;
}