+1 to both removing from codebase and adding to guidline with suggested text.
+1 for removal.On Mon, Apr 28, 2014 at 12:26 PM, Galen Charlton <gmc@esilibrary.com> wrote:
Hi,
In my view, we should not use the pragma to hide the warning messages
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";
-- 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
--Tomás Cohen AraziProsecretaría de InformáticaUniversidad Nacional de CórdobaGPG: 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/