NAME

Git::Database - Provide access to the Git object database

VERSION

version 0.004

SYNOPSIS

# get a store
my $r  = Git::Repository->new();

# build a backend to access the store
my $db = Git::Database::Backend::Git::Repository->new( store => $r );

# or let Git::Database figure it out by itself
my $db = Git::Database->new( store => $r );

DESCRIPTION

Git::Database provides access from Perl to the object database stored in a Git repository. It can use any supported Git wrapper to access the Git object database maintained by Git.

Git::Database is actually a factory class: "new" returns backend instances.

METHODS

new

my $r = Git::Repository->new;

# $db is-a Git::Database::Backend::Git::Repository
my $db = Git::Database->new( store => $r );

Return a backend object, based on the class of the store object.

BACKEND METHODS

The backend methods are split between several roles, and not all backends do all the roles. Therefore not all backend objects support all the following methods.

From Git::Database::Role::Backend

This is the minimum required role to be a backend. Hence this method is always available.

hash_object

From Git::Database::Role::ObjectReader

has_object
get_object_meta
get_object_attributes
get_object
all_digests

From Git::Database::Role::ObjectWriter

put_object

From Git::Database::Role::RefReader

refs
ref_names
ref_digest

From Git::Database::Role::RefWriter

put_ref
delete_ref

SEE ALSO

Objects

Git::Database::Object::Blob, Git::Database::Object::Tree, Git::Database::Object::Commit, Git::Database::Object::Tag.

Backend roles

Git::Database::Role::Backend, Git::Database::Role::ObjectReader, Git::Database::Role::ObjectWriter, Git::Database::Role::RefReader, Git::Database::Role::RefWriter.

Backends

Git::Database::Backend::None, Git::Database::Backend::Git::Repository.

SUPPORT

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

perldoc Git::Database

You can also look for information at:

AUTHOR

Philippe Bruhat (BooK) <book@cpan.org>.

COPYRIGHT

Copyright 2013-2016 Philippe Bruhat (BooK), all rights reserved.

LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.