#!/usr/bin/perl

# ABSTRACT: administer a Pinto repository
# PODNAME: pinto-admin

use strict;
use warnings;

#-----------------------------------------------------------------------------

our $VERSION = '0.031'; # VERSION

#-----------------------------------------------------------------------------

use App::Pinto::Admin;
exit App::Pinto::Admin->run();

#-----------------------------------------------------------------------------



=pod

=for :stopwords Jeffrey Ryan Thalhammer Imaginative Software Systems

=head1 NAME

pinto-admin - administer a Pinto repository

=head1 VERSION

version 0.031

=head1 SYNOPSIS

  pinto-admin --root=/path/to/repos [global options] COMMAND [command options] [ARGS]

=head1 DESCRIPTION

C<pinto-admin> is a command line utility for creating and managing a
local Pinto repository.  The repository can contain your own
distributions and/or foreign distributions from another repository
(such as a CPAN mirror).  You can also put locally patched versions of
foreign distributions in your repository.  Then you can then point
L<cpan> (or L<cpanm> or L<cpanp>) at your Pinto repository and
build/install your distributions.

=head1 BASIC USAGE

  # Create an empty repository at /some/dir
  pinto-admin --root=/some/dir create

  # Add your own distribution to the repository
  pinto-admin --root=/some/dir add Foo-Bar-1.2.tar.gz

  # Fetch a module and all its dependencies
  pinto-admin --root=/some/dir import Plack

  # Fetch the latest version of all modules
  pinto-admin --root=/some/dir mirror

  # Then install stuff, forcing everything to come from your repository
  cpanm --mirror-only --mirror file:///some/dir Foo::Bar

  # Or install stuff, falling back to a CPAN for missing dependencies
  cpanm --mirror file:///some/dir Foo::Bar

=head1 GLOBAL OPTIONS

The following options are available for all commands.

=over 4

=item --root=/path/to/your/repository

Specifies the path to the root directory of your repository.  This is
mandatory for all commands unless you've set the C<PINTO_REPOSITORY>
environment variable to point to your repository.

=item --nocolor

Do not colorize diagnostic messages according to severity.

=item --quiet | -q

Report only fatal errors.  This option silently overrides the
C<--verbose> options.

=item --verbose | -v

Display more diagnostic messages.  This switch can be repeated multiple
times for greater effect.

=back

=head1 COMMANDS

L<pinto-admin> supports several commands that perform various
operations on your repository, or report information about your
repository.  To get a listing of all the available commands:

  $> pinto-admin commands

Each command has its own options and arguments.  To get a brief
summary:

  $> pinto-admin help COMMAND

To see the complete manual for a command:

  $> pinto-admin manual COMMAND

=head1 CONFIGURATION

The F<.pinto/config> directory of every repository contains a
configuration file named F<pinto.ini>.  This file will be generated
for you whenever you create a new repository.  Thereafter, it is up to
you to manually adjust the configuration file as you see fit.

The configuration file is in the typical INI-file format.  Parameters
are C<NAME = VALUE> pairs.  Blank lines are ignored, leading and
trailing whitespace is discarded.  Comments start with a semi-colon
(;).

=over 4

=item devel = 0|1

If true, L<Pinto> will allow development releases to appear in the
index when they are the "latest" version.  Otherwise, development
releases are accepted into the repository but never included in the
index.  Defaults to 0.

=item sources = URL [ URL URL ... ]

A space-delimited list of the URLs of the repositories that L<Pinto>
will pull foreign distributions from.  These could be public CPAN
mirrors, a private L<CPAN::Mini> mirror, or other Pinto repositories.
Defaults to L<http://cpan.perl.org>.

=item noinit = 0|1

If true, L<Pinto> will not pull/update the repository from the VCS
before each operation.  This is only relevant if you are using a
VCS‐based storage mechanism.  This can speed up operations
considerably, but should only be used if you *know* that your working
copy is up to date and you are going to be the only actor touching the
Pinto repository within the VCS.  Defaults to 0.

=item store = CLASS_NAME

The name of the class that will handle storage of your Pinto
repository.  The default is L<Pinto::Store>, which simply stores your
repository on the local file system.  Alternatives Stores like
L<Pinto::Store::VCS::Svn> and L<Pinto::Store::VCS::Git> will also
store your repository inside a version control system (VCS).  See the
documentation for each of those modules for information on setting up
L<Pinto> with a VCS.

=back

=head1 SEE ALSO

L<Pinto::Manual> for detailed information on using the Pinto tools.

L<pinto-server> to allow remote access to your Pinto repository.

L<pinto-remote> to interact with a remote Pinto repository.

=head1 AUTHOR

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

=head1 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.

=cut


__END__


