From c477183e28751780ca34a0a48cd481adcaa406c3 Mon Sep 17 00:00:00 2001 From: borisneubert Date: Wed, 4 Dec 2024 19:04:10 +0000 Subject: [PATCH] 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 --- fhem/CHANGED | 2 ++ fhem/FHEM/57_Calendar.pm | 20 -------------------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 6d1c6f1a4..31338d808 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -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 diff --git a/fhem/FHEM/57_Calendar.pm b/fhem/FHEM/57_Calendar.pm index 4fe937d43..8a185d1c5 100644 --- a/fhem/FHEM/57_Calendar.pm +++ b/fhem/FHEM/57_Calendar.pm @@ -399,26 +399,6 @@ changes =cut -##################################### -# -# smartmatch replacement -# -##################################### - -# use contains_($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