diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-06-08 18:50:59 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-06-08 18:50:59 +0000 |
commit | b7e56b30b8c4801b1d4d4a47c71d92de0e7bc438 (patch) | |
tree | ba45ac8c81aee5c088e6d798dbc4c717a25420dc /urpm/util.pm | |
parent | 0e5a8d90c6e77256975baa394653d42172790fb3 (diff) | |
download | urpmi-b7e56b30b8c4801b1d4d4a47c71d92de0e7bc438.tar urpmi-b7e56b30b8c4801b1d4d4a47c71d92de0e7bc438.tar.gz urpmi-b7e56b30b8c4801b1d4d4a47c71d92de0e7bc438.tar.bz2 urpmi-b7e56b30b8c4801b1d4d4a47c71d92de0e7bc438.tar.xz urpmi-b7e56b30b8c4801b1d4d4a47c71d92de0e7bc438.zip |
(any) introduce it from MDK::Common
(needed for next commit)
Diffstat (limited to 'urpm/util.pm')
-rw-r--r-- | urpm/util.pm | 7 |
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"; |