NAME
Pinto::Repository - Coordinates the database, files, and indexes
VERSION
version 0.041
ATTRIBUTES
db
store
cache
extractor
METHODS
initialize()
commit()
tag()
locate( package => );
locate( distribution => );
lock_shared
lock_exclusive
unlock
get_stack()
get_stack( name => $stack_name )
get_stack( name => $stack_name, nocroak => 1 )
Returns the Pinto::Schema::Result::Stack object with the given $stack_name
. If there is no stack with such a name in the repository, throws an exception. If the nocroak
option is true, than an exception will not be thrown and undef will be returned. If you do not specify a stack name (or it is undefined) then you'll get whatever stack is currently marked as the default stack.
get_default_stack()
Returns the Pinto::Schema::Result::Stack that is currently marked as the default stack in this repository. This is what you get when you call get_stack
without any arguments.
At any time, there must be exactly one default stack. This method will throw an exception if it discovers that condition is not true.
get_package( name => $pkg_name )
Returns the latest version of Pinto:Schema::Result::Package with the given $pkg_name
. If there is no such package with that name in the repository, returns nothing.
get_package( name => $pkg_name, stack => $stk_name )
Returns the Pinto:Schema::Result::Package with the given $pkg_name
that is on the stack with the given $stk_name
. If there is no such package on that stack, returns nothing.
get_distribution( author => $author, archive => $archive )
Returns the Pinto::Schema::Result::Distribution with the given author ID and archive name. If there is no distribution in the respoistory, returns nothing.
add( archive => $path, author => $id )
add( archive => $path, author => $id, source => $url )
Adds the distribution archive located on the local filesystem at $path
to the repository in the author directory for the author with $id
. The packages provided by the distribution will be indexed, and the prerequisites will be recorded. If the the source
is specified, it must be the URL to the root of the repository where the distribution came from. Otherwise, the source
defaults to LOCAL
. Returns a Pinto::Schema::Result::Distribution object representing the newly added distribution.
pull( url => $url )
Pulls a distribution archive from a remote repository and add
s it to this repository. The packages provided by the distribution will be indexed, and the prerequisites will be recorded. Returns a Pinto::Schema::Result::Distribution object representing the newly pulled distribution.
pull( package => $spec )
pull( distribution => $spec )
create_stack(name => $stk_name, properties => { $key => $value, ... } )
locate(path = $dist_path)
locate(package => $name)
locate(package => $name, version => $vers)
get_or_locate(path = $dist_path)
get_or_locate(package => $name)
get_or_locate(package => $name, version => $vers)
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.