aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--URPM/Resolve.pm12
1 files changed, 10 insertions, 2 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm
index 0d8b37c..febf7fa 100644
--- a/URPM/Resolve.pm
+++ b/URPM/Resolve.pm
@@ -11,9 +11,17 @@ use Config;
# perl_checker: require URPM
#- a few functions from MDK::Common copied here:
-sub listlength { scalar @_ }
+sub listlength {
+ my (@l) = @_;
+ scalar @l;
+}
sub min { my $n = shift; $_ < $n and $n = $_ foreach @_; $n }
-sub uniq { my %l; $l{$_} = 1 foreach @_; grep { delete $l{$_} } @_ }
+sub uniq {
+ my (@l) = @_;
+ my %l;
+ $l{$_} = 1 foreach @l;
+ grep { delete $l{$_} } @l;
+}
sub find(&@) {
my $f = shift;
$f->($_) and return $_ foreach @_;