diff --git a/Koha/Objects.pm b/Koha/Objects.pm index c19ced53c1..2bf33917a7 100644 --- a/Koha/Objects.pm +++ b/Koha/Objects.pm @@ -118,9 +118,21 @@ sub find_or_create { return $object; } -=head3 Koha::Objects->search(); +=head3 search -my @objects = Koha::Objects->search($params); + # list context + my @objects = Koha::Objects->search([$params, $attributes]); + # scalar context + my $objects = Koha::Objects->search([$params, $attributes]); + while (my $object = $objects->next) { + do_stuff($object); + } + +This B the I class, and generates a resultset +based on the query I<$params> and I<$attributes> that are passed (like in DBIC). + +In B it returns an array of I objects. +In B it returns an iterator. =cut