network-functions.pl: declare use of smartmatch

Message ID 20210130195242.25421-1-arne_f@ipfire.org
State Accepted
Commit 69d90c36cc17a6b475253c29d98f02e26f1adb5e
Headers
Series network-functions.pl: declare use of smartmatch |

Commit Message

Arne Fitzenreiter Jan. 30, 2021, 7:52 p.m. UTC
  perl complains about the use of experimental smartmatch feature
if it is not declared.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
---
 config/cfgroot/network-functions.pl | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Leo-Andres Hofmann Jan. 31, 2021, 12:01 p.m. UTC | #1
Hi Arne,

Thank you! I completely missed to include this when I started using smartmatches.

Regards
Leo

Am 30.01.2021 um 20:52 schrieb Arne Fitzenreiter:
> perl complains about the use of experimental smartmatch feature
> if it is not declared.
>
> Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
> ---
>   config/cfgroot/network-functions.pl | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/config/cfgroot/network-functions.pl b/config/cfgroot/network-functions.pl
> index 7bd6466e0..e94404f05 100644
> --- a/config/cfgroot/network-functions.pl
> +++ b/config/cfgroot/network-functions.pl
> @@ -25,6 +25,7 @@ package Network;
>   
>   require "/var/ipfire/general-functions.pl";
>   
> +use experimental 'smartmatch';
>   use Socket;
>   
>   # System ethernet configuration
  

Patch

diff --git a/config/cfgroot/network-functions.pl b/config/cfgroot/network-functions.pl
index 7bd6466e0..e94404f05 100644
--- a/config/cfgroot/network-functions.pl
+++ b/config/cfgroot/network-functions.pl
@@ -25,6 +25,7 @@  package Network;
 
 require "/var/ipfire/general-functions.pl";
 
+use experimental 'smartmatch';
 use Socket;
 
 # System ethernet configuration