summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-02-01 19:19:21 +0000
committerThierry Vignaud <tv@mageia.org>2012-02-01 19:19:21 +0000
commit30e2a32f1b26b93d5d9aed310cb9be6f047a27d3 (patch)
treea9d4fd84d4cacf3b16d3a4d2cdeee15db1eec1f6 /urpm
parent6ffec4be6a0cf15824a48f639d6fe2a32de9d508 (diff)
downloadurpmi-30e2a32f1b26b93d5d9aed310cb9be6f047a27d3.tar
urpmi-30e2a32f1b26b93d5d9aed310cb9be6f047a27d3.tar.gz
urpmi-30e2a32f1b26b93d5d9aed310cb9be6f047a27d3.tar.bz2
urpmi-30e2a32f1b26b93d5d9aed310cb9be6f047a27d3.tar.xz
urpmi-30e2a32f1b26b93d5d9aed310cb9be6f047a27d3.zip
perl_checker cleanups
Diffstat (limited to 'urpm')
-rw-r--r--urpm/args.pm9
-rw-r--r--urpm/download.pm4
-rw-r--r--urpm/lock.pm2
-rw-r--r--urpm/msg.pm2
-rw-r--r--urpm/xml_info.pm2
5 files changed, 9 insertions, 10 deletions
diff --git a/urpm/args.pm b/urpm/args.pm
index 5fe00aea..b4084ae6 100644
--- a/urpm/args.pm
+++ b/urpm/args.pm
@@ -363,10 +363,9 @@ my %options_spec = (
);
-eval
-{
+eval {
#require urpm::dudf;
- $options_spec{'urpmi'}{'force-dudf'} = \$::force_dudf;
+ $options_spec{urpmi}{'force-dudf'} = \$::force_dudf;
};
@@ -456,7 +455,7 @@ foreach my $k ("f", "z", "update", "norebuild!", "probe-rpms", '<>')
foreach my $k ("no-md5sum")
{
- $options_spec{'urpmi'}{$k} = $options_spec{'urpmi.addmedia'}{$k} = $options_spec{'urpmi.update'}{$k};
+ $options_spec{urpmi}{$k} = $options_spec{'urpmi.addmedia'}{$k} = $options_spec{'urpmi.update'}{$k};
}
foreach my $k ("a", '<>') {
@@ -483,7 +482,7 @@ sub set_root {
}
}
-sub set_verbosity {
+sub set_verbosity() {
$options{verbose} >= 0 or $urpm->{info} = sub {};
$options{verbose} > 0 or $urpm->{log} = sub {};
}
diff --git a/urpm/download.pm b/urpm/download.pm
index dffd423c..f4718036 100644
--- a/urpm/download.pm
+++ b/urpm/download.pm
@@ -5,7 +5,7 @@ package urpm::download;
use strict;
use urpm::msg;
use urpm::util;
-use bytes();
+use bytes ();
use Cwd;
use Exporter;
# perl_checker: require urpm
@@ -67,7 +67,7 @@ sub preferred_downloader {
my @metalink_downloaders = urpm::download::available_metalink_downloaders();
my $metalink_disabled = !$$use_metalink && $medium->{disable_metalink};
- if (($$use_metalink) && !$metalink_disabled) {
+ if ($$use_metalink && !$metalink_disabled) {
#- If metalink is used, only aria2 is available as other downloaders doesn't support metalink
unshift @available, @metalink_downloaders;
}
diff --git a/urpm/lock.pm b/urpm/lock.pm
index 2e2de87a..6139be7b 100644
--- a/urpm/lock.pm
+++ b/urpm/lock.pm
@@ -4,7 +4,7 @@ package urpm::lock;
use strict;
use urpm::msg;
-
+use urpm::util;
#- avoid putting a require on Fcntl ':flock' (which is perl and not perl-base).
my ($LOCK_SH, $LOCK_EX, $LOCK_NB, $LOCK_UN) = (1, 2, 4, 8);
diff --git a/urpm/msg.pm b/urpm/msg.pm
index 8a1f1fb0..cc66a163 100644
--- a/urpm/msg.pm
+++ b/urpm/msg.pm
@@ -20,7 +20,7 @@ our @EXPORT = qw(N N_ P translate bug_log message_input message_input_ toMb form
#- I18N.
use Locale::gettext;
-use POSIX();
+use POSIX ();
POSIX::setlocale(POSIX::LC_ALL(), "");
my @textdomains = qw(urpmi rpm-summary-main rpm-summary-contrib rpm-summary-devel);
foreach my $domain (@textdomains) {
diff --git a/urpm/xml_info.pm b/urpm/xml_info.pm
index 74869957..ca923ebc 100644
--- a/urpm/xml_info.pm
+++ b/urpm/xml_info.pm
@@ -134,7 +134,7 @@ sub _get_xml_info_nodes {
if ($fn =~ /$fullnames_re/) {
$nodes{$fn} = $get_node->($reader);
delete $todo{$fn};
- %todo == ();
+ keys(%todo) == 0;
} else {
$reader->next;
0;