From: Bernhard Bitsch <bbitsch@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: [PATCH] services.cgi: avoid experimental warnings
Date: Tue, 17 Jan 2023 14:33:09 +0100 [thread overview]
Message-ID: <6e8b8e45-c29c-f7e5-e293-300bc8381161@ipfire.org> (raw)
In-Reply-To: <D2078C4D-C78B-4E0A-A480-66AD1CFC3A6A@ipfire.org>
[-- Attachment #1: Type: text/plain, Size: 2235 bytes --]
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(a)ipfire.org <mailto:jon.murphy(a)ipfire.org>
>
>
>
>> On Jan 16, 2023, at 3:28 PM, Bernhard Bitsch <bbitsch(a)ipfire.org
>> <mailto:bbitsch(a)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(a)ipfire.org
>>> <mailto:jon.murphy(a)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
>
next parent reply other threads:[~2023-01-17 13:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <D2078C4D-C78B-4E0A-A480-66AD1CFC3A6A@ipfire.org>
2023-01-17 13:33 ` Bernhard Bitsch [this message]
[not found] <26DD6931-137C-4EAC-B6FA-667BCFDA9DD7@ipfire.org>
2023-02-09 16:39 ` Michael Tremer
2023-01-16 20:34 Jon Murphy
2023-01-16 21:28 ` Bernhard Bitsch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6e8b8e45-c29c-f7e5-e293-300bc8381161@ipfire.org \
--to=bbitsch@ipfire.org \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox