Message ID | 20180211231930.12738-1-berny156@gmx.de |
---|---|
State | Dropped |
Headers |
Return-Path: <development-bounces@lists.ipfire.org> Received: from mail01.ipfire.org (mail01.ipfire.org [IPv6:2001:470:7183:25::1]) by web02.i.ipfire.org (Postfix) with ESMTP id 84760602CB for <patchwork@web02.i.ipfire.org>; Mon, 12 Feb 2018 00:19:47 +0100 (CET) X-Virus-Scanned: ClamAV at mail01.ipfire.org Received: from mail01.i.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id 8D683111B3AA; Sun, 11 Feb 2018 23:19:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 mail01.ipfire.org 8D683111B3AA Authentication-Results: mail01.ipfire.org; dmarc=none (p=none dis=none) header.from=gmx.de Authentication-Results: mail01.ipfire.org; spf=pass smtp.mailfrom=development-bounces@lists.ipfire.org X-Virus-Scanned: ClamAV at mail01.ipfire.org Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id F2237111B3A9 for <development@lists.ipfire.org>; Sun, 11 Feb 2018 23:19:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 mail01.ipfire.org F2237111B3A9 Authentication-Results: mail01.ipfire.org; dmarc=none (p=none dis=none) header.from=gmx.de Authentication-Results: mail01.ipfire.org; spf=pass smtp.mailfrom=berny156@gmx.de Received: from quad.berny.local ([46.244.225.239]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M9K5G-1exgMf1VJW-00Cjxz for <development@lists.ipfire.org>; Mon, 12 Feb 2018 00:19:31 +0100 From: Bernhard Held <berny156@gmx.de> To: development@lists.ipfire.org Subject: [PATCH] Network::network_equal: fix definition check of array Date: Mon, 12 Feb 2018 00:19:30 +0100 Message-Id: <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2UJvG 6Hbn7brdV1BZ6LYTFGERAIXjXFMVooNfKtjgr8kAljNE2t8n4QUWTId/h+j+RcVTh1bnNQmAg UnBB1FT46kWnOUyHd1IfD6JCinUFg== X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: IPFire development talk <development.lists.ipfire.org> List-Unsubscribe: <https://lists.ipfire.org/mailman/options/development>, <mailto:development-request@lists.ipfire.org?subject=unsubscribe> List-Archive: <https://lists.ipfire.org/pipermail/development/> List-Post: <mailto:development@lists.ipfire.org> List-Help: <mailto:development-request@lists.ipfire.org?subject=help> List-Subscribe: <https://lists.ipfire.org/mailman/listinfo/development>, <mailto:development-request@lists.ipfire.org?subject=subscribe> Errors-To: development-bounces@lists.ipfire.org Sender: "Development" <development-bounces@lists.ipfire.org> |
Series |
Network::network_equal: fix definition check of array
|
|
Commit Message
Bernhard Held
Feb. 12, 2018, 10:19 a.m. UTC
--- config/cfgroot/network-functions.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Hello, this patch shows the following perl errors: defined(@array) is deprecated at config/cfgroot/network-functions.pl line 114. (Maybe you should just omit the defined()?) defined(@array) is deprecated at config/cfgroot/network-functions.pl line 114. (Maybe you should just omit the defined()?) You can use the testsuite at the bottom of the file to confirm that the functions are doing what they are supposed to do. Best, -Michael On Mon, 2018-02-12 at 00:19 +0100, Bernhard Held wrote: > --- > config/cfgroot/network-functions.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/config/cfgroot/network-functions.pl b/config/cfgroot/network-functions.pl > index 2902aabb0..3bf17b092 100644 > --- a/config/cfgroot/network-functions.pl > +++ b/config/cfgroot/network-functions.pl > @@ -111,7 +111,7 @@ sub network_equal { > my @bin1 = &network2bin($network1); > my @bin2 = &network2bin($network2); > > - if (!defined $bin1 || !defined $bin2) { > + if (!defined @bin1 || !defined @bin2) { > return undef; > } >
On 02/12/2018 at 12:38 AM, Michael Tremer wrote: > Hello, > > this patch shows the following perl errors: > > defined(@array) is deprecated at config/cfgroot/network-functions.pl line 114. > (Maybe you should just omit the defined()?) > defined(@array) is deprecated at config/cfgroot/network-functions.pl line 114. > (Maybe you should just omit the defined()?) Interesting, I'm testing on IPFire 2.19. Here perl 5.12 prefers the '$'. My host with Perl 5.26 indeed prefers the '@' as well. Which perl versions apply for network-functions.pl? > You can use the testsuite at the bottom of the file to confirm that the > functions are doing what they are supposed to do. Thanks, this helps ;-) Regards, Bernhard
Hi, the perl version is a bit outdated that we are running on IPFire. It's perl 5.12.3: https://git.ipfire.org/?p=ipfire-2.x.git;a=blob;f=lfs/perl;h=0c239318c39 15cdfbad3ff602b075bb425513bf3;hb=HEAD I ran that testsuite with exactly that version of perl. Best, -Michael On Mon, 2018-02-12 at 01:19 +0100, Bernhard Held wrote: > On 02/12/2018 at 12:38 AM, Michael Tremer wrote: > > Hello, > > > > this patch shows the following perl errors: > > > > defined(@array) is deprecated at config/cfgroot/network-functions.pl line > > 114. > > (Maybe you should just omit the defined()?) > > defined(@array) is deprecated at config/cfgroot/network-functions.pl line > > 114. > > (Maybe you should just omit the defined()?) > > Interesting, I'm testing on IPFire 2.19. Here perl 5.12 prefers the '$'. > My host with Perl 5.26 indeed prefers the '@' as well. > > Which perl versions apply for network-functions.pl? > > > You can use the testsuite at the bottom of the file to confirm that the > > functions are doing what they are supposed to do. > > Thanks, this helps ;-) > > Regards, > Bernhard
diff --git a/config/cfgroot/network-functions.pl b/config/cfgroot/network-functions.pl index 2902aabb0..3bf17b092 100644 --- a/config/cfgroot/network-functions.pl +++ b/config/cfgroot/network-functions.pl @@ -111,7 +111,7 @@ sub network_equal { my @bin1 = &network2bin($network1); my @bin2 = &network2bin($network2); - if (!defined $bin1 || !defined $bin2) { + if (!defined @bin1 || !defined @bin2) { return undef; }