Bug 24217

Summary: use strict for all modules
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: 1joynelson, martin.renvoize
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00
Bug Depends on:    
Bug Blocks: 2505, 24218, 24361, 24365, 24367, 24529, 24595, 25305    
Attachments: Bug 24217: use Modern::Perl for modules
Bug 24217: use Modern::Perl for modules when strict is missing
Bug 24217: use Modern::Perl for modules
Bug 24217: use Modern::Perl for modules when strict is missing
Bug 24217: use Modern::Perl for modules when strict is missing

Description Jonathan Druart 2019-12-11 12:02:02 UTC
This is not done yet!
We need that for modules (at least) ASAP
Comment 1 Jonathan Druart 2019-12-11 12:04:47 UTC
Created attachment 96202 [details] [review]
Bug 24217: use Modern::Perl for modules

We absolutely need that for modules.

Test plan: git grep 2505 **/*.pm should not return any results

And let's see later what needs to be fixed.
Comment 2 Jonathan Druart 2019-12-11 12:05:10 UTC
RMaints, I do not think you should backport this.
Comment 3 Martin Renvoize 2019-12-11 12:28:17 UTC
I think we missed a few ;)

I used `grep -IRiL "Modern::Perl" **/*.pm` to check and came up with this list after your patch

C4/AuthoritiesMarc.pm
C4/Auth.pm
C4/Auth_with_cas.pm
C4/Barcodes.pm
C4/Bookseller.pm
C4/Boolean.pm
C4/Breeding.pm
C4/Calendar.pm
C4/Charset.pm
C4/ClassSortRoutine.pm
C4/ClassSource.pm
C4/Creators.pm
C4/Debug.pm
C4/HoldsQueue.pm
C4/HTML5Media.pm
C4/Images.pm
C4/ImportBatch.pm
C4/ImportExportFramework.pm
C4/ItemCirculationAlertPreference.pm
C4/Labels.pm
C4/Languages.pm
C4/Linker.pm
C4/Log.pm
C4/Message.pm
C4/Patroncards.pm
C4/Scrubber.pm
C4/Service.pm
C4/ShelfBrowser.pm
C4/SMS.pm
C4/Stats.pm
C4/Tags.pm
C4/Templates.pm
C4/TmplToken.pm
C4/TTParser.pm
Koha/Cache.pm
Koha/Calendar.pm
Koha/Edifact.pm
Koha/EDI.pm
Koha/Schema.pm
Koha/SuggestionEngine.pm
OpenILS/QueryParser.pm
Comment 4 Jonathan Druart 2019-12-11 12:33:05 UTC
Created attachment 96204 [details] [review]
Bug 24217: use Modern::Perl for modules when strict is missing

We absolutely need that for modules.
We are enabling strict by using Modern::Perl.
Note that other modules from C4 use strict and warnings, instead of
Modern::Perl

Test plan: git grep 2505 **/*.pm should not return any results

And let's see later what needs to be fixed.
Comment 5 Martin Renvoize 2019-12-11 13:02:01 UTC
Created attachment 96205 [details] [review]
Bug 24217: use Modern::Perl for modules

We absolutely need that for modules.

Test plan: git grep 2505 **/*.pm should not return any results

And let's see later what needs to be fixed.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize 2019-12-11 13:04:50 UTC
Created attachment 96206 [details] [review]
Bug 24217: use Modern::Perl for modules when strict is missing

We absolutely need that for modules.
We are enabling strict by using Modern::Perl.
Note that other modules from C4 use strict and warnings, instead of
Modern::Perl

Test plan: git grep 2505 **/*.pm should not return any results

And let's see later what needs to be fixed.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize 2019-12-11 13:05:32 UTC
Agreed, Signing off
Comment 8 Nick Clemens 2019-12-16 11:05:05 UTC
Created attachment 96312 [details] [review]
Bug 24217: use Modern::Perl for modules when strict is missing

We absolutely need that for modules.
We are enabling strict by using Modern::Perl.
Note that other modules from C4 use strict and warnings, instead of
Modern::Perl

Test plan: git grep 2505 **/*.pm should not return any results

And let's see later what needs to be fixed.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 9 Martin Renvoize 2020-01-03 10:50:16 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 10 Jonathan Druart 2020-01-07 11:25:55 UTC
See bug 24361 for follow-ups.
Comment 11 Jonathan Druart 2020-01-07 14:50:58 UTC
It broke the translator script, see bug 24365.
Comment 12 Joy Nelson 2020-01-14 01:04:16 UTC
not backported to 19.11.x