diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2006-11-09 16:13:38 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2006-11-09 16:13:38 +0000 |
commit | 51eac793bcf872ce65a3fdf517d3fe65b538dc3a (patch) | |
tree | 82691026bc83707a72598fb8d4b179103d04c29c | |
parent | 2649e84c7dc6ba818d0ae8cbeedcdda224e5a61d (diff) | |
download | urpmi-51eac793bcf872ce65a3fdf517d3fe65b538dc3a.tar urpmi-51eac793bcf872ce65a3fdf517d3fe65b538dc3a.tar.gz urpmi-51eac793bcf872ce65a3fdf517d3fe65b538dc3a.tar.bz2 urpmi-51eac793bcf872ce65a3fdf517d3fe65b538dc3a.tar.xz urpmi-51eac793bcf872ce65a3fdf517d3fe65b538dc3a.zip |
perl_checker compliance, don't import POSIX functions (it helps perl_checker)
-rw-r--r-- | gurpmi.pm | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -7,14 +7,14 @@ package gurpmi; #- This is needed because text printed by Gtk2 will always be encoded #- in UTF-8; we first check if LC_ALL is defined, because if it is, #- changing only LC_COLLATE will have no effect. -use POSIX qw(setlocale LC_ALL LC_COLLATE); +use POSIX(); use locale; my $collation_locale = $ENV{LC_ALL}; if ($collation_locale) { - $collation_locale =~ /UTF-8/ or setlocale(LC_ALL, "$collation_locale.UTF-8"); + $collation_locale =~ /UTF-8/ or POSIX::setlocale(POSIX::LC_ALL(), "$collation_locale.UTF-8"); } else { - $collation_locale = setlocale(LC_COLLATE); - $collation_locale =~ /UTF-8/ or setlocale(LC_COLLATE, "$collation_locale.UTF-8"); + $collation_locale = POSIX::setlocale(POSIX::LC_COLLATE()); + $collation_locale =~ /UTF-8/ or POSIX::setlocale(POSIX::LC_COLLATE(), "$collation_locale.UTF-8"); } use urpm; @@ -47,7 +47,7 @@ sub fatal { my $s = $_[0]; print STDERR "$s\n"; exit 1 } #- Parse command line #- puts options in %gurpmi::options #- puts bare names (not rpm filenames) in @gurpmi::names -sub parse_command_line { +sub parse_command_line() { my @all_rpms; our %options; our @names; @@ -77,10 +77,10 @@ sub parse_command_line { /^--?[hv?]/ and usage(); fatal(N("Unknown option %s", $_)); } - if (-f) { - push @all_rpms, $_ + if (-f $_) { + push @all_rpms, $_; } else { - push @names, $_ + push @names, $_; } } |