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

Marcel de Rooy <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|BLOCKED                     |Failed QA

--- Comment #4 from Marcel de Rooy <[email protected]> ---
My first feeling is that if we allow list context, we should return an empty
list instead of undef. It would fix your if( @a ) test since  @a==0. But what
would pop up again? Constructions like the one in Objects.t:
my $patrons = {
        foo => Koha::Patrons->find('foo'),
        bar => 'baz',
};
This would generate "Odd number of elements in anonymous hash" warnings and
mixup of hash keys and values. So we should have to add scalars again in the
parameter hashes.
So the question actually becomes: Where do we want to add scalars?
Imo the current situation helps us to identify problems immediately. If you
want to add a "push @a, Koha::Objects->find($b)" you will crash rightaway and
see that you must add a scalar. The other way around, the empty list in the
anonymous hash will not popup right away, so the problem may go unnoticed. For
me, the balance goes to keeping the forbid-list-context.
Moving to FQA but could have been ID too.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to