diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-03-16 20:11:50 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-03-16 20:11:50 +0000 |
commit | cedc4412311d4a0e137227eb3896fe5802a95118 (patch) | |
tree | 1ef931461c4c3130b2dab5c3a4a1079c3afbfea4 /URPM | |
parent | 8ec122193e959c00f4f3d673f0966f0a27a5803d (diff) | |
download | perl-URPM-cedc4412311d4a0e137227eb3896fe5802a95118.tar perl-URPM-cedc4412311d4a0e137227eb3896fe5802a95118.tar.gz perl-URPM-cedc4412311d4a0e137227eb3896fe5802a95118.tar.bz2 perl-URPM-cedc4412311d4a0e137227eb3896fe5802a95118.tar.xz perl-URPM-cedc4412311d4a0e137227eb3896fe5802a95118.zip |
(listlenght,uniq) enable perl_checker to see how many arguments are expected
Diffstat (limited to 'URPM')
-rw-r--r-- | URPM/Resolve.pm | 12 |
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 @_; |