summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-11-03 13:37:40 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-11-03 13:37:40 +0000
commit3e7012bc9d1b97defc35901d5a31cc928bc23131 (patch)
tree969a9d5b43dd3d8622fe00a489d1d5491a0d725f /urpm
parent91d1d5e40d3ba242573012a093e8b5cc1e7c5bc4 (diff)
downloadurpmi-3e7012bc9d1b97defc35901d5a31cc928bc23131.tar
urpmi-3e7012bc9d1b97defc35901d5a31cc928bc23131.tar.gz
urpmi-3e7012bc9d1b97defc35901d5a31cc928bc23131.tar.bz2
urpmi-3e7012bc9d1b97defc35901d5a31cc928bc23131.tar.xz
urpmi-3e7012bc9d1b97defc35901d5a31cc928bc23131.zip
add member()
Diffstat (limited to 'urpm')
-rw-r--r--urpm/util.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/urpm/util.pm b/urpm/util.pm
index fafc5c2e..75133c6c 100644
--- a/urpm/util.pm
+++ b/urpm/util.pm
@@ -9,7 +9,7 @@ our @EXPORT = qw(quotespace unquotespace
remove_internal_name
reduce_pathname offset_pathname
md5sum untaint
- difference2
+ difference2 member
);
(our $VERSION) = q($Revision$) =~ /(\d+)/;
@@ -109,6 +109,7 @@ sub move {
}
sub difference2 { my %l; @l{@{$_[1]}} = (); grep { !exists $l{$_} } @{$_[0]} }
+sub member { my $e = shift; foreach (@_) { $e eq $_ and return 1 } 0 }
1;