Bugzilla – Attachment 104538 Details for
Bug 23185
Koha::Objects supports passing through 'update' which means we can side step 'set' + 'store'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23185: Realistic POD for Koha::Objects->search
Bug-23185-Realistic-POD-for-KohaObjects-search.patch (text/plain), 1.18 KB, created by
Tomás Cohen Arazi
on 2020-05-07 21:30:23 UTC
(
hide
)
Description:
Bug 23185: Realistic POD for Koha::Objects->search
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi
Created:
2020-05-07 21:30:23 UTC
Size:
1.18 KB
patch
obsolete
>From b422e017eca6ad74f0f66d5fea181b01e48d661e Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 7 May 2020 18:20:57 -0300 >Subject: [PATCH] Bug 23185: Realistic POD for Koha::Objects->search > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/Objects.pm | 16 ++++++++++++++-- > 1 file changed, 14 insertions(+), 2 deletions(-) > >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 >+ >+ # 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<instantiates> the I<Koha::Objects> class, and generates a resultset >+based on the query I<$params> and I<$attributes> that are passed (like in DBIC). > >-my @objects = Koha::Objects->search($params); >+In B<list context> it returns an array of I<Koha::Object> objects. >+In B<scalar context> it returns an iterator. > > =cut > >-- >2.26.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23185
:
103867
|
103868
|
103946
|
103947
|
104087
|
104088
|
104089
|
104232
|
104233
|
104234
|
104271
|
104272
|
104273
|
104276
|
104537
| 104538 |
104541