That’s awesome, Julian! I hope that gets in soon. That’s what I was thinking too, Martin. I figure Perl 7 provides a distinct goal to target. Kyle, that’s probably right. I guess Debian Testing and then we’ll see it first in a stable Ubuntu. Although after reading a pretty harsh critique at http://blogs.perl.org/users/leon_timmermans/2020/06/not-quite-getting-better..., maybe it will be a long time before we see a change to the system Perl. I’ve been thinking more about how to run Koha using a non-system Perl, but I am not sure if it’s possible right now. After looking through Plack::App::WrapCGI, it looks like even Plack will use the system Perl for the CGI scripts it executes: https://metacpan.org/source/Plack::App::WrapCGI#L56. So even if Debian/Ubuntu came with a perl7 binary, we wouldn’t be able to use it unless we updated shebangs. Sometimes, I do wonder if we should consider transitioning away from Perl. It would be a huge task for the Staff Client, but the OPAC could be achievable (the cgi-bin folder of OPAC has < 100 files ending in .pl whereas the Staff Client has > 450 – notwithstanding the lib folder). The business logic could be moved to the REST API, and then the presentation logic could be rewritten in whatever language we wanted. DSpace’s 7.0 release replaces the Java front-end with an Angular front-end. Now I’m not saying we should build a pure-JS front-end, but are we just using Perl due to inertia? If we do leverage the REST API more, it also means it would be easier to rewrite components if the time came where we felt it was necessary to rewrite. Even if we do stick with Perl, maybe we should look at killing of the CGI OPAC and do a fully PSGI compliant OPAC which could use a binary other than /usr/bin/perl. I suppose in any case it’s still early days for Perl 7, but I reckon there’s no harm in targeting it, and it looks like Julian’s patch and follow-up ideas are a great move toward that! David Cook Systems Librarian Prosentient Systems 72/330 Wattle St Ultimo, NSW 2007 Australia Office: 02 9212 0899 Online: 02 8005 0595 From: Koha-devel <koha-devel-bounces@lists.koha-community.org> On Behalf Of Kyle Hall Sent: Thursday, 25 June 2020 11:58 PM To: Renvoize, Martin <martin.renvoize@ptfs-europe.com> Cc: Koha Devel <koha-devel@lists.koha-community.org> Subject: Re: [Koha-devel] Perl 7 Totally agreed! We should work toward Perl 7 compliance as soon as possible, which I presume is the point when it is available in Debian. --- http://www.kylehall.info ByWater Solutions ( http://bywatersolutions.com ) Meadville Public Library ( http://www.meadvillelibrary.org ) Crawford County Federated Library System ( http://www.ccfls.org ) On Thu, Jun 25, 2020 at 4:18 AM Renvoize, Martin <martin.renvoize@ptfs-europe.com <mailto:martin.renvoize@ptfs-europe.com> > wrote: I was also reading about Perl 7 last night and the idea of trying to move our codebase towards it excites me.. it would be great if this was the prompt to help concentrate our efforts on modernising our codebase. Wasn't aware of bug 21395, I'll take a look asap. I like the idea of adding ProhibitIndirectSyntax to our perlcritic.. I'd back that. Martin Renvoize <https://www.ptfs-europe.com/> Development Team Manager Community Release Manager (19.11, 20.05) Phone: +44 (0) 1483 378728 Mobile: +44 (0) 7725 985 636 Email: <mailto:martin.renvoize@ptfs-europe.com> martin.renvoize@ptfs-europe.com Fax: +44 (0) 800 756 6384 <https://www.ptfs-europe.com> www.ptfs-europe.com Registered in the United Kingdom No. 06416372 VAT Reg No. 925 7211 30 The information contained in this email message may be privileged, confidential and protected from disclosure. If you are not the intended recipient, any dissemination, distribution or copying is strictly prohibited. If you think that you have received this email message in error, please email the sender at info@ptfs-europe.com <mailto:info@ptfs-europe.com> On Thu, 25 Jun 2020 at 08:16, Julian Maurice <julian.maurice@biblibre.com <mailto:julian.maurice@biblibre.com> > wrote: Le 25/06/2020 à 06:26, dcook@prosentient.com.au <mailto:dcook@prosentient.com.au> a écrit :
The article is worth a read though. It points out a number of language aspects that have changed (e.g. bareword file handles, indirect object notation, etc), and we could actually work on eliminating those in our current code to bring Koha more in line with modern Perl.
Just a reminder that this bug exists : https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21395 (Make perlcritic happy) and that it replaces most (but not all) of the bareword filehandle. We can also add https://metacpan.org/pod/Perl::Critic::Policy::Objects::ProhibitIndirectSynt... to our default .perlcriticrc -- Julian Maurice BibLibre _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org <mailto:Koha-devel@lists.koha-community.org> https://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/ _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org <mailto:Koha-devel@lists.koha-community.org> https://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/