1 package DBM::Deep::Iterator;
6 use warnings FATAL => 'all';
8 use DBM::Deep::Iterator::DBI ();
9 use DBM::Deep::Iterator::File ();
17 This is an internal-use-only object for L<DBM::Deep/>. It is the iterator
18 for FIRSTKEY() and NEXTKEY().
28 The constructor takes a hashref of params. The hashref is assumed to have the
33 =item * engine (of type L<DBM::Deep::Engine/>
35 =item * base_offset (the base_offset of the invoking DBM::Deep object)
47 engine => $args->{engine},
48 base_offset => $args->{base_offset},
51 Scalar::Util::weaken( $self->{engine} );
58 This method takes no arguments.
60 It will reset the iterator so that it will start from the beginning again.
62 This method returns nothing.
66 sub reset { $_[0]{breadcrumbs} = []; return }
68 =head2 get_sector_iterator( $loc )
70 This takes a location. It will load the sector for $loc, then instantiate the
71 right iteartor type for it.
73 This returns the sector iterator.
77 sub get_sector_iterator { die "get_sector_iterator must be implemented in a child class" }
79 =head2 get_next_key( $obj )
83 sub get_next_key { die "get_next_key must be implemented in a child class" }