From: Moritz Bunkus Date: Fri, 24 May 2013 12:13:51 +0000 (+0200) Subject: Eigene Implementation von 'any' durch List::MoreUtils ersetzt X-Git-Tag: release-3.1.0beta1~401^2~16 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/b2b1edc8b2c519ffc98904bcb694b3dc651f3992?ds=inline Eigene Implementation von 'any' durch List::MoreUtils ersetzt --- diff --git a/SL/CVar.pm b/SL/CVar.pm index 0a91c59f6..02456cb0b 100644 --- a/SL/CVar.pm +++ b/SL/CVar.pm @@ -2,12 +2,13 @@ package CVar; use strict; +use List::MoreUtils qw(any); use List::Util qw(first); use Scalar::Util qw(blessed); use Data::Dumper; use SL::DBUtils; -use SL::MoreCommon qw(any listify); +use SL::MoreCommon qw(listify); sub get_configs { $main::lxdebug->enter_sub(); diff --git a/SL/MoreCommon.pm b/SL/MoreCommon.pm index dfc5a7d80..41cac3c08 100644 --- a/SL/MoreCommon.pm +++ b/SL/MoreCommon.pm @@ -3,7 +3,7 @@ package SL::MoreCommon; require Exporter; our @ISA = qw(Exporter); -our @EXPORT = qw(save_form restore_form compare_numbers any cross); +our @EXPORT = qw(save_form restore_form compare_numbers cross); our @EXPORT_OK = qw(ary_union ary_intersect ary_diff listify ary_to_hash uri_encode uri_decode); use List::MoreUtils qw(zip); @@ -76,15 +76,6 @@ sub compare_numbers { return $a <=> $b; } -sub any (&@) { - my $f = shift; - return if ! @_; - for (@_) { - return 1 if $f->(); - } - return 0; -} - sub cross(&\@\@) { my $op = shift; use vars qw/@A @B/;