- add single line to code: no warnings 'experimental'; - corrects this issue: https://lists.ipfire.org/pipermail/development/2022-December/015113.html
Signed-off-by: Jon Murphy jon.murphy@ipfire.org --- html/cgi-bin/services.cgi | 1 + 1 file changed, 1 insertion(+)
diff --git a/html/cgi-bin/services.cgi b/html/cgi-bin/services.cgi index 3c0f27f99..0d06ab5fe 100644 --- a/html/cgi-bin/services.cgi +++ b/html/cgi-bin/services.cgi @@ -21,6 +21,7 @@
use strict; use feature "switch"; +no warnings 'experimental'; # enable only the following on debugging purpose #use warnings; #use CGI::Carp 'fatalsToBrowser';
Hi,
just a little annotation after reading the Perl docs.
Am 16.01.2023 um 21:34 schrieb Jon Murphy:
- add single line to code: no warnings 'experimental';
- corrects this issue: https://lists.ipfire.org/pipermail/development/2022-December/015113.html
Signed-off-by: Jon Murphy jon.murphy@ipfire.org
html/cgi-bin/services.cgi | 1 + 1 file changed, 1 insertion(+)
diff --git a/html/cgi-bin/services.cgi b/html/cgi-bin/services.cgi index 3c0f27f99..0d06ab5fe 100644 --- a/html/cgi-bin/services.cgi +++ b/html/cgi-bin/services.cgi @@ -21,6 +21,7 @@
use strict; use feature "switch"; +no warnings 'experimental';
Because the warnings originate from the switch statement only, we should be specific:
no warnings 'experimental:smartmatch';
# enable only the following on debugging purpose #use warnings; #use CGI::Carp 'fatalsToBrowser';
Further the line should be placed here. This creates the right sequence if the debugging mode is switched on ( by uncommenting these lines ).
Regards, Bernhard
Did the:
no warnings 'experimental:smartmatch’;
work A-OK?
Should this not be `no warnings ‘experimental:switch’;` ?
I don’t mind making the changes but I am doing this a little blind since I don’t do perl…
Jon
Jon Murphy jon.murphy@ipfire.org
On Jan 16, 2023, at 3:28 PM, Bernhard Bitsch bbitsch@ipfire.org wrote:
Hi,
just a little annotation after reading the Perl docs.
Am 16.01.2023 um 21:34 schrieb Jon Murphy:
- add single line to code: no warnings 'experimental';
- corrects this issue: https://lists.ipfire.org/pipermail/development/2022-December/015113.html
Signed-off-by: Jon Murphy jon.murphy@ipfire.org
html/cgi-bin/services.cgi | 1 + 1 file changed, 1 insertion(+) diff --git a/html/cgi-bin/services.cgi b/html/cgi-bin/services.cgi index 3c0f27f99..0d06ab5fe 100644 --- a/html/cgi-bin/services.cgi +++ b/html/cgi-bin/services.cgi @@ -21,6 +21,7 @@ use strict; use feature "switch"; +no warnings 'experimental';
Because the warnings originate from the switch statement only, we should be specific:
no warnings 'experimental:smartmatch';
# enable only the following on debugging purpose #use warnings; #use CGI::Carp 'fatalsToBrowser';
Further the line should be placed here. This creates the right sequence if the debugging mode is switched on ( by uncommenting these lines ).
Regards, Bernhard
Hi,
Am 17.01.2023 um 04:12 schrieb jon:
Did the:
no warnings 'experimental:smartmatch’;
work A-OK?
Sorry for the typo. The correct syntax is no warnings 'experimental::smartmatch'; I just tried it.
Should this not be `no warnings ‘experimental:switch’;` ?
No. As far as I've understood the docs, you can switch on the switch functionality with use feature "switch"; The implementation of the 'when' sometimes uses the experimental smartmatch operator. Therefore the warnings have to be disabled.
I don’t mind making the changes but I am doing this a little blind since I don’t do perl…
Jon
Therefore others on the dev list can look on this. ;)
Bernhard
Jon Murphy jon.murphy@ipfire.org mailto:jon.murphy@ipfire.org
On Jan 16, 2023, at 3:28 PM, Bernhard Bitsch <bbitsch@ipfire.org mailto:bbitsch@ipfire.org> wrote:
Hi,
just a little annotation after reading the Perl docs.
Am 16.01.2023 um 21:34 schrieb Jon Murphy:
- add single line to code: no warnings 'experimental';
- corrects this issue:
https://lists.ipfire.org/pipermail/development/2022-December/015113.html https://lists.ipfire.org/pipermail/development/2022-December/015113.html Signed-off-by: Jon Murphy <jon.murphy@ipfire.org
mailto:jon.murphy@ipfire.org>
html/cgi-bin/services.cgi | 1 + 1 file changed, 1 insertion(+) diff --git a/html/cgi-bin/services.cgi b/html/cgi-bin/services.cgi index 3c0f27f99..0d06ab5fe 100644 --- a/html/cgi-bin/services.cgi +++ b/html/cgi-bin/services.cgi @@ -21,6 +21,7 @@ use strict; use feature "switch"; +no warnings 'experimental';
Because the warnings originate from the switch statement only, we should be specific:
no warnings 'experimental:smartmatch';
# enable only the following on debugging purpose #use warnings; #use CGI::Carp 'fatalsToBrowser';
Further the line should be placed here. This creates the right sequence if the debugging mode is switched on ( by uncommenting these lines ).
Regards, Bernhard
Peter,
Was this patch to be included in CU 173?
Jon
Jon Murphy jon.murphy@ipfire.org
On Jan 16, 2023, at 2:34 PM, Jon Murphy jon.murphy@ipfire.org wrote:
- add single line to code: no warnings 'experimental';
- corrects this issue: https://lists.ipfire.org/pipermail/development/2022-December/015113.html
Signed-off-by: Jon Murphy jon.murphy@ipfire.org
html/cgi-bin/services.cgi | 1 + 1 file changed, 1 insertion(+)
diff --git a/html/cgi-bin/services.cgi b/html/cgi-bin/services.cgi index 3c0f27f99..0d06ab5fe 100644 --- a/html/cgi-bin/services.cgi +++ b/html/cgi-bin/services.cgi @@ -21,6 +21,7 @@
use strict; use feature "switch"; +no warnings 'experimental'; # enable only the following on debugging purpose #use warnings;
#use CGI::Carp 'fatalsToBrowser';
2.30.2
Hello,
No, it doesn’t look like it:
https://git.ipfire.org/?p=ipfire-2.x.git;a=history;f=html/cgi-bin/services.c...
I will merge it into next. As it is only cosmetic, I will avoid rebuilding master for a little while. We will have to do this later on anyways.
-Michael
On 8 Feb 2023, at 04:29, jon jon.murphy@ipfire.org wrote:
Peter,
Was this patch to be included in CU 173?
Jon
Jon Murphy jon.murphy@ipfire.org
On Jan 16, 2023, at 2:34 PM, Jon Murphy jon.murphy@ipfire.org wrote:
- add single line to code: no warnings 'experimental';
- corrects this issue: https://lists.ipfire.org/pipermail/development/2022-December/015113.html
Signed-off-by: Jon Murphy jon.murphy@ipfire.org
html/cgi-bin/services.cgi | 1 + 1 file changed, 1 insertion(+)
diff --git a/html/cgi-bin/services.cgi b/html/cgi-bin/services.cgi index 3c0f27f99..0d06ab5fe 100644 --- a/html/cgi-bin/services.cgi +++ b/html/cgi-bin/services.cgi @@ -21,6 +21,7 @@
use strict; use feature "switch"; +no warnings 'experimental'; # enable only the following on debugging purpose #use warnings;
#use CGI::Carp 'fatalsToBrowser';
2.30.2