Bug 33341

Summary: Perl 5.36 doesn't consider some of our code cool
Product: Koha Reporter: Tomás Cohen Arazi (tcohen) <tomascohen>
Component: Architecture, internals, and plumbingAssignee: Tomás Cohen Arazi (tcohen) <tomascohen>
Status: CLOSED FIXED QA Contact: Martin Renvoize (ashimema) <martin.renvoize>
Severity: normal    
Priority: P5 - low CC: arthur.suzuki, dcook, jonathan.druart, lucas, martin.renvoize, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.05,22.05.12,21.11.20
Circulation function:
Bug Depends on:    
Bug Blocks: 34174    
Attachments: Bug 33341: Address some perlcritic errors in 5.36
Bug 33341: Address some perlcritic errors in 5.36

Description Tomás Cohen Arazi (tcohen) 2023-03-27 12:10:17 UTC
To reproduce:
1. Launch bookworm KTD:
   $ KOHA_IMAGE=master-bookworm ktd up -d
2. Run:
   $ ktd --shell
  k$ prove t/00-testcritic.t
=> FAIL: It fails!
Comment 1 Tomás Cohen Arazi (tcohen) 2023-03-27 12:27:34 UTC
Created attachment 148763 [details] [review]
Bug 33341: Address some perlcritic errors in 5.36

Some old-style code is making our tests fail when run in Debian Testing.

This patch addresses this.

To test:
1. Launch bookworm KTD:
   $ KOHA_IMAGE=master-bookworm ktd up -d
2. Run:
   $ ktd --shell
  k$ prove t/00-testcritic.t
=> FAIL: It fails!
3. Apply the patch
4. Repeat 2
=> SUCCESS: Tests now pass!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 Jonathan Druart 2023-03-28 11:59:30 UTC
*** Bug 32654 has been marked as a duplicate of this bug. ***
Comment 3 Martin Renvoize (ashimema) 2023-03-28 12:47:24 UTC
Fast QAing this one.. it's just simple syntax improvement.. no functional changes but a move to best practice.
Comment 4 Martin Renvoize (ashimema) 2023-03-28 12:49:54 UTC
Created attachment 148818 [details] [review]
Bug 33341: Address some perlcritic errors in 5.36

Some old-style code is making our tests fail when run in Debian Testing.

This patch addresses this.

To test:
1. Launch bookworm KTD:
   $ KOHA_IMAGE=master-bookworm ktd up -d
2. Run:
   $ ktd --shell
  k$ prove t/00-testcritic.t
=> FAIL: It fails!
3. Apply the patch
4. Repeat 2
=> SUCCESS: Tests now pass!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Tomás Cohen Arazi (tcohen) 2023-03-28 12:51:13 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 6 Matt Blenkinsop 2023-04-11 10:55:14 UTC
Nice work everyone!

Pushed to stable for 22.11.x
Comment 7 Lucas Gass (lukeg) 2023-04-24 17:17:11 UTC
Backported to 22.05.x for upcoming 22.05.12
Comment 8 Arthur Suzuki 2023-05-03 19:04:57 UTC
applied to 21.11.x for 21.11.20
Comment 9 Jonathan Druart 2023-07-05 14:24:58 UTC
It broke Ris export, see bug 34174.