aboutsummaryrefslogtreecommitdiffstats
path: root/URPM/Query.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-08-02 00:03:20 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-08-02 00:03:20 +0000
commit17a0eb83d851331bad1e2c1185d1751910197846 (patch)
treee237a3e1fce1e8a7a7f1c3d48e52bf04aa6bc39c /URPM/Query.pm
parentc1e1c394c9f708066aa5b39d02c9ae0be7dcfaf0 (diff)
downloadperl-URPM-17a0eb83d851331bad1e2c1185d1751910197846.tar
perl-URPM-17a0eb83d851331bad1e2c1185d1751910197846.tar.gz
perl-URPM-17a0eb83d851331bad1e2c1185d1751910197846.tar.bz2
perl-URPM-17a0eb83d851331bad1e2c1185d1751910197846.tar.xz
perl-URPM-17a0eb83d851331bad1e2c1185d1751910197846.zip
Make perl_checker a bit more happy
Diffstat (limited to 'URPM/Query.pm')
-rw-r--r--URPM/Query.pm15
1 files changed, 7 insertions, 8 deletions
diff --git a/URPM/Query.pm b/URPM/Query.pm
index e207f1d..5b62f11 100644
--- a/URPM/Query.pm
+++ b/URPM/Query.pm
@@ -12,13 +12,13 @@ use strict;
# Return an array of ID tag
sub tag2id {
- my @l = @_;
- my %taglist = URPM::list_rpm_tag();
- map { $taglist{uc($_)} || undef } @l;
+ my @l = @_;
+ my %taglist = URPM::list_rpm_tag();
+ map { $taglist{uc($_)} || undef } @l;
}
sub query_pkg {
- my ($urpm, $pkg, $query) = @_;
+ my (undef, $pkg, $query) = @_;
my @tags = map {
[ $pkg->get_tag(tag2id($_)) ]
} $query =~ m/\%\{([^{}]*)\}*/g;
@@ -29,12 +29,11 @@ sub query_pkg {
my ($max, @res) = 0;
foreach (@tags) { $max < $#{$_} and $max = $#{$_} };
-
+
foreach my $i (0 .. $max) {
- push(@res, sprintf($query, map { ${$_}[ $#{$_} < $i ? $#{$_} : $i ] } @tags));
+ push(@res, sprintf($query, map { ${$_}[ $#{$_} < $i ? $#{$_} : $i ] } @tags));
}
- @res
+ @res
}
-
1;