https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28883
--- Comment #24 from Tomás Cohen Arazi <[email protected]> --- (In reply to Martin Renvoize from comment #23) > (In reply to Jonathan Druart from comment #21) > > (In reply to Tomás Cohen Arazi from comment #19) > > > $template->param( > > > outstanding_debits => scalar $patron->account->outstanding_debits, > > > items => scalar $biblio->items, > > > ); > > > > I'd personally prefer to not have to forget the "scalar" (and almost always > > use iterator) and explicitly ask for the list when I need it (->as_list). > > > > Not blocking, just expressing my opinion :) > > I'm of two minds.. in some ways perls contextual returns are lovely and > DWIM.. but in other cases I'd really rather it required me to be specific. > > DBIC actually gets around this by having a context ignorant accessor.. > adding _rs to accessor methods (search, relationships) will force list > context and give you back an iterator rather than getting clever with > wantarray. I understand and agree Koha::Objects being too clever might be counter productive. What I found was an inconsistent behavior. Getting rid of the use of wantarray should be discussed broadly, as a big behavior change (think plugins, etc). -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://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/
