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

NAME

Pinto::Store - Back-end storage for a Pinto repository

VERSION

version 0.009

DESCRIPTION

Pinto::Store is the default back-end for a Pinto repository. It basically just represents files on disk. You should look at Pinto::Store::Svn or Pinto::Store::Git for a more interesting example.

METHODS

initialize()

This method is called before each batch of Pinto events, and is responsible for doing any setup work that is required by the Store. This could include making a directory on the file system, checking out or updating a working copy, cloning, or pulling commits. If the initialization fails, an exception should be thrown.

The default implementation simply creates a directory.

is_initialized()

Returns true if the store appears to be initialized. In this base class, it simply means that the working directory exists. For other derived classes, this could mean that the working copy is up-to-date.

finalize(message => 'what happened')

This method is called after each batch of Pinto events and is responsible for doing any work that is required to commit the Store. This could include scheduling files for addition/deletion, pushing commits to a remote repository, and/or making a tag. If the finalization fails, an exception should be thrown.

add( file => $some_file, source => $other_file )

Adds the specified file (as a Path::Class::File) to this Store. The path to file is presumed to be somewhere beneath the root directory of this Store. If the optional source is given (as a Path::Class::File), then that source is first copied to file. If source is not specified, then the file must already exist. Returns a reference to this Store.

remove( file => $some_file, prune => 1 );

Removes the specified file (as a Path::Class::File) from this Store. The path to file is presumed to be somewhere beneath the root directory of this Store. If prune is true, then any empty directories above file will also be removed. Returns a reference to this Store.

AUTHOR

Jeffrey Ryan Thalhammer <jeff@imaginative-software.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2011 by Imaginative Software Systems.

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