Hi all, happy 2022 :-D
I wanted to mention that a bug that introduces Koha::Result::Boolean has been pushed [1]. This class provides a way to return an object, that evaluates to a boolean in (Perl's) bool context but also carries reasons for the result.
It has been used in a couple places, like bug 29765 [2] and bug 29788 [3] (which still needs the QA step).
--