Bug 17552: Revert "Bug 17091: Remove explicit declaration of Koha::Objects->reset"
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 4 Nov 2016 13:47:21 +0000 (13:47 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Mon, 7 Nov 2016 16:39:43 +0000 (16:39 +0000)
This reverts commit c253af2e519570c4024891dc4d1e81743a2c5fc2.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Koha/Objects.pm

index 176821a..da2f2c9 100644 (file)
@@ -181,6 +181,23 @@ sub next {
     return $object;
 }
 
+=head3 Koha::Objects->reset();
+
+Koha::Objects->reset();
+
+resets iteration so the next call to next() will start agein
+with the first object in a set.
+
+=cut
+
+sub reset {
+    my ( $self ) = @_;
+
+    $self->_resultset()->reset();
+
+    return $self;
+}
+
 =head3 Koha::Objects->as_list();
 
 Koha::Objects->as_list();