[Koha-bugs] [Bug 19809] Koha::Objects::find calls do not need to be forbidden in list context

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Nov 5 17:00:57 CET 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19809

--- Comment #16 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
(In reply to Julian Maurice from comment #14)
> >      return $object;
> > This is no longer good. Since you are returning 'undef' here literally while
> > you want to return empty list if it is list context.
> 
> I do not want to return an empty list. I want Koha::Objects::find to behave
> like DBIx::Class::ResultSet::find, which returns undef if no results were
> found (even if in list context)

OK. I didnt get that right away. It is quite unperlish to return ( undef ).
But yes, I checked and DBIx does it here..
So, should we stick to perl or to DBIx ? Since Koha::Objects relies on DBIx, I
wouldnt mind doing the latter here.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list