13 March 2009
This post may be outdated due to it was written on 2009. The links may be broken. The code may be not working anymore. Leave comments if needed.
I just released another module http://search.cpan.org/dist/GitStore/ this morning.

GitStore - Git as versioned data store in Perl
use GitStore;

my $gs = GitStore->new('/path/to/repo');
$gs->store( 'users/obj.txt', $obj );
$gs->store( ['config', 'wiki.txt'], { hash_ref => 1 } );
$gs->store( 'yyy/xxx.log', 'Log me' );

# later or in another pl
my $val = $gs->get( 'user/obj.txt' ); # $val is the same as $obj
my $val = $gs->get( 'config/wiki.txt' ); # $val is { hashref => 1 } );
my $val = $gs->get( ['yyy', 'xxx.log' ] ); # $val is undef since discard

for now, it requires the Git::PurePerl master code. you must git clone it from http://github.com/acme/git-pureperl/tree/master and install into your local dir.

The git repo is http://github.com/fayland/perl-git-store/tree/master
welcome to fork it and submit any patches.


blog comments powered by Disqus