Store::Digest - Store opaque data objects keyed on their cryptographic digests


Version 0.06


    use Store::Digest;

    # initialize the store

    my $store = Store::Digest->new(
        driver  => 'FileSystem',
        # all other options pass through to the driver
        dir     => '/var/db/store-digest',

    # add an object

    my $obj = $store->add(
        content  => $fh,
        language => 'en',
        mtime    => DateTime->now,

    # if you want to get the object back

    my $str = 'ni:///sha-256;IcnxQtEMlihv1wFHTMjkMprLO-9-ZXZD2lcsQLmQ1xA';
    my $uri = URI->new($str);
    my $obj = $store->get($uri);


This module will eventually act as a unifying interface for multiple storage drivers, but there is currently only one implemented: Store::Digest::Driver::FileSystem. Go see that.

    Note to users prior to this version (all two of you): The control database that contains the store-wide metadata was for some stupid reason a BerkeleyDB::Hash, and I have changed it to be a BerkeleyDB::Btree. I have included a conversion routine in the driver which should do the job transparently, but since it deletes the old control database, you may run into trouble if you don't shut down all processes attached to this database before upgrading.



Dorian Taylor, <dorian at>


Please report any issues to


You can find documentation for this module with the perldoc command.

    perldoc Store::Digest

You can also look for information at:


Copyright 2012-2018 Dorian Taylor.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.