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

NAME

Git::Database::Backend::Git::Sub - A Git::Database backend based on Git::Sub

VERSION

version 0.012

SYNOPSIS

    # Git::Sub does not offer an OO interface
    $dir = 'path/to/some/git/repository/';

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

DESCRIPTION

This backend reads and writes data from a Git repository using the Git::Sub Git wrapper.

Since Git::Sub has a functional interface, the store attribute is simply the path in which the git commands will run. If the path is a relative path, it will be coerced to an absolute path.

Note that overloaded objects (such as Path::Tiny, Path::Class and others) that stringify to the actual path are supported. When coercion to an absolute path occurs, it attempts to create an object of the same class representing the absolute path. If the coercion fails to create an object of the same class, the store attribute will be a string containing the absolute path.

Git Database Roles

This backend does the following roles (check their documentation for a list of supported methods): Git::Database::Role::Backend, Git::Database::Role::ObjectReader, Git::Database::Role::ObjectWriter, Git::Database::Role::RefReader, Git::Database::Role::RefWriter.

CAVEAT

This backend may have issues with Perl 5.8.9, they are fixed in Git::Sub 0.163320.

There is also a minimum requirement on System::Sub 0.162800.

AUTHOR

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

COPYRIGHT

Copyright 2016-2019 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.