mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
57_Calendar: remove smartmatch replacement as it is now officially in fhem.pl
git-svn-id: https://svn.fhem.de/fhem/trunk@29398 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
0ccb8f229e
commit
c477183e28
@ -1,5 +1,7 @@
|
||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||
# Do not insert empty lines here, update check depends on it
|
||||
- change: 57_Calendar: remove smartmatch replacement as it is now
|
||||
officially in fhem.pl
|
||||
- feature: 93_DbLog: check valid Event Time limit, Forum: #139847
|
||||
- bugfix: 93_DbRep: fix check changeValue Forum: #139950
|
||||
- change: 01_FHEMWEB: add filtered Event Monitor to detail view
|
||||
|
@ -399,26 +399,6 @@ changes
|
||||
|
||||
=cut
|
||||
|
||||
#####################################
|
||||
#
|
||||
# smartmatch replacement
|
||||
#
|
||||
#####################################
|
||||
|
||||
# use contains_<type>($scalar, @array) instead of $scalar ~~ @array
|
||||
# requires List:Util
|
||||
# see https://www.perlmonks.org/?node_id=1067462
|
||||
|
||||
sub contains_numeric($@) {
|
||||
my ($scalar, @array) = @_;
|
||||
return any { $_ == $scalar } @array;
|
||||
}
|
||||
|
||||
sub contains_string($@) {
|
||||
my ($scalar, @array) = @_;
|
||||
return any { $_ eq $scalar } @array;
|
||||
}
|
||||
|
||||
#####################################
|
||||
#
|
||||
# human readable time format
|
||||
|
Loading…
Reference in New Issue
Block a user