The latest Ubuntu LTS release includes Perl 5.18. One of the main noticeable consequences of this is that some 5.10 features are now marked as experimental, and hence warnings appear everywhere. One example could be the use of '~~' (C4/Search.pm:536). These warnings can be avoided using the following pragma [1]: no if $] >= 5.018, 'warnings', "experimental::feature_name"; I'd like to know your opinion on how to cope with this. I guess we already had this kind of problems in the past. Regards To+ [1] http://search.cpan.org/dist/perl-5.18.0/pod/perldelta.pod#Lexical_$__is_now_... -- Tomás Cohen Arazi Prosecretaría de Informática Universidad Nacional de Córdoba ✆ +54 351 4333190 ext 13168 GPG: B76C 6E7C 2D80 551A C765 E225 0A27 2EA1 B2F3 C15F
Hi, On Mon, Apr 28, 2014 at 7:43 AM, Tomas Cohen Arazi <tomascohen@gmail.com> wrote:
The latest Ubuntu LTS release includes Perl 5.18. One of the main noticeable consequences of this is that some 5.10 features are now marked as experimental, and hence warnings appear everywhere.
One example could be the use of '~~' (C4/Search.pm:536). These warnings can be avoided using the following pragma [1]:
no if $] >= 5.018, 'warnings', "experimental::feature_name";
In my view, we should not use the pragma to hide the warning messages -- we should remove use of the experimental constructs, including the smartmatch operator. There have already been a couple recent-ish patches pushed [1] to remove uses of smartmatch. This is because, as the link you included in your email states, features that the Perl developers have marked as experimental are subject to change, which could lead to surprises as future versions of Perl get released. I have opened a new bug [2] for removing the remaining uses of the smartmatch operator, and I suggest that we add a new coding guideline to this effect: === PERL19: The use of the Perl smartmatch operator is forbidden === The Perl smartmatch operator, including ~~ and given/when, has been [http://perldoc.perl.org/5.18.0/perldelta.html#The-smartmatch-family-of-featu... marked experimental] as of Perl 5.18.0. Since the meaning of the smartmatch operator is subject to change, and since using it will by default add warnings to the error log, new code should not use it. [1] Bugs 11468 and 11479 [2] http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12151 Regards, Galen -- Galen Charlton Manager of Implementation Equinox Software, Inc. / The Open Source Experts email: gmc@esilibrary.com direct: +1 770-709-5581 cell: +1 404-984-4366 skype: gmcharlt web: http://www.esilibrary.com/ Supporting Koha and Evergreen: http://koha-community.org & http://evergreen-ils.org
+1 for removing the smartmatch operator and adding the new coding guideline Katrin
-----Original Message----- From: koha-devel-bounces@lists.koha-community.org [mailto:koha-devel- bounces@lists.koha-community.org] On Behalf Of Galen Charlton Sent: Monday, April 28, 2014 5:27 PM To: Tomas Cohen Arazi Cc: koha-devel Subject: Re: [Koha-devel] Perl 5.18
Hi,
On Mon, Apr 28, 2014 at 7:43 AM, Tomas Cohen Arazi <tomascohen@gmail.com> wrote:
The latest Ubuntu LTS release includes Perl 5.18. One of the main noticeable consequences of this is that some 5.10 features are now marked as experimental, and hence warnings appear everywhere.
One example could be the use of '~~' (C4/Search.pm:536). These warnings can be avoided using the following pragma [1]:
no if $] >= 5.018, 'warnings', "experimental::feature_name";
In my view, we should not use the pragma to hide the warning messages -- we should remove use of the experimental constructs, including the smartmatch operator. There have already been a couple recent-ish patches pushed [1] to remove uses of smartmatch.
This is because, as the link you included in your email states, features that the Perl developers have marked as experimental are subject to change, which could lead to surprises as future versions of Perl get released.
I have opened a new bug [2] for removing the remaining uses of the smartmatch operator, and I suggest that we add a new coding guideline to this effect:
=== PERL19: The use of the Perl smartmatch operator is forbidden ===
The Perl smartmatch operator, including ~~ and given/when, has been [http://perldoc.perl.org/5.18.0/perldelta.html#The-smartmatch-family-of- features-are-now-experimental marked experimental] as of Perl 5.18.0. Since the meaning of the smartmatch operator is subject to change, and since using it will by default add warnings to the error log, new code should not use it.
[1] Bugs 11468 and 11479 [2] http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12151
Regards,
Galen -- Galen Charlton Manager of Implementation Equinox Software, Inc. / The Open Source Experts email: gmc@esilibrary.com direct: +1 770-709-5581 cell: +1 404-984-4366 skype: gmcharlt web: http://www.esilibrary.com/ Supporting Koha and Evergreen: http://koha-community.org & http://evergreen- ils.org _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha- community.org/ bugs : http://bugs.koha-community.org/
Greetings,
I suggest that we add a new coding guideline
+1 to coding guideline.
to this effect:
=== PERL19: The use of the Perl smartmatch operator is forbidden ===
The Perl smartmatch operator, including ~~ and given/when, has been [http://perldoc.perl.org/5.18.0/perldelta.html#The-smartmatch-family-of-featu... marked experimental] as of Perl 5.18.0. Since the meaning of the smartmatch operator is subject to change, and since using it will by default add warnings to the error log, new code should not use it.
+1 to this sample phrasing. GPML, Mark Tompsett
+1 for removal. On Mon, Apr 28, 2014 at 12:26 PM, Galen Charlton <gmc@esilibrary.com> wrote:
Hi,
On Mon, Apr 28, 2014 at 7:43 AM, Tomas Cohen Arazi <tomascohen@gmail.com> wrote:
The latest Ubuntu LTS release includes Perl 5.18. One of the main noticeable consequences of this is that some 5.10 features are now marked as experimental, and hence warnings appear everywhere.
One example could be the use of '~~' (C4/Search.pm:536). These warnings can be avoided using the following pragma [1]:
no if $] >= 5.018, 'warnings', "experimental::feature_name";
In my view, we should not use the pragma to hide the warning messages -- we should remove use of the experimental constructs, including the smartmatch operator. There have already been a couple recent-ish patches pushed [1] to remove uses of smartmatch.
This is because, as the link you included in your email states, features that the Perl developers have marked as experimental are subject to change, which could lead to surprises as future versions of Perl get released.
I have opened a new bug [2] for removing the remaining uses of the smartmatch operator, and I suggest that we add a new coding guideline to this effect:
=== PERL19: The use of the Perl smartmatch operator is forbidden ===
The Perl smartmatch operator, including ~~ and given/when, has been [ http://perldoc.perl.org/5.18.0/perldelta.html#The-smartmatch-family-of-featu... marked experimental] as of Perl 5.18.0. Since the meaning of the smartmatch operator is subject to change, and since using it will by default add warnings to the error log, new code should not use it.
[1] Bugs 11468 and 11479 [2] http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12151
Regards,
Galen -- Galen Charlton Manager of Implementation Equinox Software, Inc. / The Open Source Experts email: gmc@esilibrary.com direct: +1 770-709-5581 cell: +1 404-984-4366 skype: gmcharlt web: http://www.esilibrary.com/ Supporting Koha and Evergreen: http://koha-community.org & http://evergreen-ils.org
-- Tomás Cohen Arazi Prosecretaría de Informática Universidad Nacional de Córdoba ✆ +54 351 4333190 ext 13168 GPG: B76C 6E7C 2D80 551A C765 E225 0A27 2EA1 B2F3 C15F
+1 to both removing from codebase and adding to guidline with suggested text. On 28 Apr 2014 17:56, "Tomas Cohen Arazi" <tomascohen@gmail.com> wrote:
+1 for removal.
On Mon, Apr 28, 2014 at 12:26 PM, Galen Charlton <gmc@esilibrary.com>wrote:
Hi,
On Mon, Apr 28, 2014 at 7:43 AM, Tomas Cohen Arazi <tomascohen@gmail.com> wrote:
The latest Ubuntu LTS release includes Perl 5.18. One of the main noticeable consequences of this is that some 5.10 features are now marked as experimental, and hence warnings appear everywhere.
One example could be the use of '~~' (C4/Search.pm:536). These warnings can be avoided using the following pragma [1]:
no if $] >= 5.018, 'warnings', "experimental::feature_name";
In my view, we should not use the pragma to hide the warning messages -- we should remove use of the experimental constructs, including the smartmatch operator. There have already been a couple recent-ish patches pushed [1] to remove uses of smartmatch.
This is because, as the link you included in your email states, features that the Perl developers have marked as experimental are subject to change, which could lead to surprises as future versions of Perl get released.
I have opened a new bug [2] for removing the remaining uses of the smartmatch operator, and I suggest that we add a new coding guideline to this effect:
=== PERL19: The use of the Perl smartmatch operator is forbidden ===
The Perl smartmatch operator, including ~~ and given/when, has been [ http://perldoc.perl.org/5.18.0/perldelta.html#The-smartmatch-family-of-featu... marked experimental] as of Perl 5.18.0. Since the meaning of the smartmatch operator is subject to change, and since using it will by default add warnings to the error log, new code should not use it.
[1] Bugs 11468 and 11479 [2] http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12151
Regards,
Galen -- Galen Charlton Manager of Implementation Equinox Software, Inc. / The Open Source Experts email: gmc@esilibrary.com direct: +1 770-709-5581 cell: +1 404-984-4366 skype: gmcharlt web: http://www.esilibrary.com/ Supporting Koha and Evergreen: http://koha-community.org & http://evergreen-ils.org
-- Tomás Cohen Arazi Prosecretaría de Informática Universidad Nacional de Córdoba ✆ +54 351 4333190 ext 13168 GPG: B76C 6E7C 2D80 551A C765 E225 0A27 2EA1 B2F3 C15F
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
participants (5)
-
Fischer, Katrin -
Galen Charlton -
Mark Tompsett -
Renvoize, Martin -
Tomas Cohen Arazi