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.
This may be also useful when scapping code for strings.
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.
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
Created attachment 195334 [details] [review] Bug 42092: Remove space in use of 'qw(' Just a syntax change so no test plan needed.
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>
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>