summaryrefslogtreecommitdiffstats
path: root/urpm/util.pm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm/util.pm')
-rw-r--r--urpm/util.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/urpm/util.pm b/urpm/util.pm
index 58f15d12..cdceb852 100644
--- a/urpm/util.pm
+++ b/urpm/util.pm
@@ -7,6 +7,7 @@ use Exporter;
our @ISA = 'Exporter';
our @EXPORT = qw(min max quotespace unquotespace
add2hash_
+ any
find
remove_internal_name
reduce_pathname offset_pathname
@@ -188,6 +189,12 @@ sub find(&@) {
undef;
}
+sub any(&@) {
+ my $f = shift;
+ $f->($_) and return 1 foreach @_;
+ 0;
+}
+
sub append_to_file {
my $f = shift;
open(my $F, '>>', $f) or die "writing to file $f failed: $!\n";