Bug 29844: Remove use of wantarray from Koha::Objects
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 10 Jan 2022 19:18:57 +0000 (16:18 -0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 10 Feb 2022 01:36:23 +0000 (15:36 -1000)
commit4ae2f6d9d8addd4e7fb8480ea0c41adfaa0febb0
treeadcc7674e489e02638bebb474019b51bd63a7d98
parent1ea31326a6e3a5aa67918ff761cdc31efc69dcff
Bug 29844: Remove use of wantarray from Koha::Objects

This patch removes the use of `wantarray` from the following methods in
the Koha::Objects class:
- search
- search_related

In both cases, the change is trivial. And the tests get the 'list
context' portion removed as well.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Objects.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Caveat: we broke many things by removing the feature. Check follow-up
patches as well.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Koha/Objects.pm
t/db_dependent/Koha/Objects.t