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

VERSION
    Version 0.06

SYNOPSIS
        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);

METHODS
    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.

SEE ALSO
    *   Store::Digest::Driver::FileSystem

    *   Store::Digest::Object

    *   URI::ni

    *   <https://tools.ietf.org/html/rfc6920>

AUTHOR
    Dorian Taylor, "<dorian at cpan.org>"

BUGS
    Please report any issues to
    <https://github.com/doriantaylor/p5-store-digest/issues>.

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

        perldoc Store::Digest

    You can also look for information at:

    *   AnnoCPAN: Annotated CPAN documentation

        <http://annocpan.org/dist/Store-Digest>

    *   CPAN Ratings

        <http://cpanratings.perl.org/d/Store-Digest>

    *   Search CPAN

        <http://search.cpan.org/dist/Store-Digest/>

LICENSE AND COPYRIGHT
    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 <http://www.apache.org/licenses/LICENSE-2.0>.

    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.

