projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Preise incl/excl
[kivitendo-erp.git]
/
SL
/
MoreCommon.pm
diff --git
a/SL/MoreCommon.pm
b/SL/MoreCommon.pm
index
32ca6b6
..
e4e13e8
100644
(file)
--- a/
SL/MoreCommon.pm
+++ b/
SL/MoreCommon.pm
@@
-3,7
+3,7
@@
package SL::MoreCommon;
require Exporter;
@ISA = qw(Exporter);
require Exporter;
@ISA = qw(Exporter);
-@EXPORT = qw(save_form restore_form compare_numbers);
+@EXPORT = qw(save_form restore_form compare_numbers
any
);
use YAML;
use YAML;
@@
-76,5
+76,13
@@
sub compare_numbers {
return $a <=> $b;
}
return $a <=> $b;
}
+sub any (&@) {
+ my $f = shift;
+ return if ! @_;
+ for (@_) {
+ return 1 if $f->();
+ }
+ return 0;
+}
1;
1;