Bug 42092

Summary: Remove space in use of qw
Product: Koha Reporter: Fridolin Somers <fridolin.somers>
Component: Architecture, internals, and plumbingAssignee: Fridolin Somers <fridolin.somers>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Crowdfunding committed: 0
Crowdfunding contact: Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 42092: Remove space in use of 'qw/'
Bug 42092: Remove space in use of 'qw('
Bug 42092: Remove space in use of 'qw/'
Bug 42092: Remove space in use of 'qw('

Description Fridolin Somers 2026-03-13 13:18:08 UTC
Usual syntax for strings array is qw( xxx ), sometimes qw{ xxx } or qw/ xxx /.
In a few cases there is a space : qw /xxx/.
Looks like this is a correct syntax and not managed by Perl Tidy.

I would prefer it to be avoided so that code looks always the same.
Also it is not known in my editor (EPIC in Eclipse IDE), maybe other users are impacted.

So I propose to patch it.

Even add to QA tools if QA team found this a good idea.
Comment 1 Fridolin Somers 2026-03-13 14:06:11 UTC
This may be also useful when scapping code for strings.
Comment 2 Fridolin Somers 2026-03-13 15:00:55 UTC
Oh looks like this can fix some wrong tidy :

diff --git a/Koha/OAI/Client/Harvester.pm b/Koha/OAI/Client/Harvester.pm
index 0cb24cedee..fda685b167 100644
--- a/Koha/OAI/Client/Harvester.pm
+++ b/Koha/OAI/Client/Harvester.pm
@@ -31,7 +31,7 @@ use utf8;
 use open qw( :std :utf8 );
 
 use C4::Biblio          qw( AddBiblio GetFrameworkCode ModBiblio DelBiblio );
-use C4::AuthoritiesMarc qw (AddAuthority GuessAuthTypeCode ModAuthority DelAuthority );
+use C4::AuthoritiesMarc qw( AddAuthority GuessAuthTypeCode ModAuthority DelAuthority );

After tiding.
Comment 3 Fridolin Somers 2026-03-13 15:03:23 UTC
Created attachment 195333 [details] [review]
Bug 42092: Remove space in use of 'qw/'

Use syntax 'qw(' instead of 'qw /'.

Also use one value per line, makes code reading and versionning easier.
This is not enforced by Perl Tidy.

Just a syntax change so no test plan.
Just run unit tests :
t/db_dependent/Koha.t
t/Koha/SearchEngine/Elasticsearch/QueryBuilder.t
Comment 4 Fridolin Somers 2026-03-13 15:03:33 UTC
Created attachment 195334 [details] [review]
Bug 42092: Remove space in use of 'qw('

Just a syntax change so no test plan needed.
Comment 5 David Nind 2026-03-13 21:36:23 UTC
Created attachment 195359 [details] [review]
Bug 42092: Remove space in use of 'qw/'

Use syntax 'qw(' instead of 'qw /'.

Also use one value per line, makes code reading and versionning easier.
This is not enforced by Perl Tidy.

Just a syntax change so no test plan.
Just run unit tests :
t/db_dependent/Koha.t
t/Koha/SearchEngine/Elasticsearch/QueryBuilder.t

Signed-off-by: David Nind <david@davidnind.com>
Comment 6 David Nind 2026-03-13 21:36:25 UTC
Created attachment 195360 [details] [review]
Bug 42092: Remove space in use of 'qw('

Just a syntax change so no test plan needed.

Signed-off-by: David Nind <david@davidnind.com>