The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

convert( $source_dir, $dest_dir )

Copies the database from source dir into dest dir while converting it to version 2. This does nothing if the source dir database is already at version 2

open( template, filename, size )

Opens or creates the file given as a fixed record length data store. If a size is not given, it calculates the size from the template, if it can. This will die if a zero byte record size is determined.

empty

This empties out the database, setting it to zero records.

ensure_entry_count( count )

Makes sure the data store has at least as many entries as the count given. This creates empty records if needed to rearch the target record count.

Returns the number of entries in this store. This is the same as the size of the file divided by the record size.

has_id( id )

Returns true if an object with this db exists in the record store.

next_id

adds an empty record and returns its id, starting with 1

pop

Remove the last record and return it.

push( data )

Add a record to the end of this store. Returns the id assigned to that record. The data must be a scalar or list reference. If a list reference, it should conform to the pack template assigned to this store.

push( idx, data )

Saves the data to the record and the record to the filesystem. The data must be a scalar or list reference. If a list reference, it should conform to the pack template assigned to this store.

Removes the file for this record store entirely from the file system.

open( template, filename, size )

Opens or creates the file given as a fixed record length data store. If a size is not given, it calculates the size from the template, if it can. This will die if a zero byte record size is determined.

Returns the number of entries in this store. This is the same as the size of the file divided by the record size.

get_record( idx )

Returns an arrayref representing the record with the given id. The array in question is the unpacked template.

next_id

adds an empty record and returns its id, starting with 1