The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
#!env perl
use MyCPAN::App::DPAN;

MyCPAN::App::DPAN->run( @ARGV );

exit( 0 );

=pod

=head1 NAME

dpan - create a DarkPAN from directories

=head1 SYNOPSIS

	# from the command line
	prompt> dpan [-l log4perl.config] [-f config] [directory [directory2]]

=head1 DESCRIPTION

The C<dpan> script takes a list of directories, indexes any Perl distributions
it finds, and creates the PAUSE index files from what it finds. Afterward, you
should be able to point a CPAN tool at the directory and install the 
distributions normally.

If you don't specify any directories, it works with the current working
directory.

At the end, C<dpan> creates a F<modules> directory in the first directory 
(or the current working directory) and creates the F<02package.details.txt.gz>
and F<03modlist.data.gz>.

=head2 Command-line processing

=over 4

=item -f config_file

=item -l log4perl_config_file

=back

=head2 Configuration options

=over 4

=item report_dir

Where to store the distribution reports.

Default: a directory named F<indexer_reports> in the current working directory
	
=item temp_dir

Where to unpack the dists or create any temporary files.

Default: a temp directory in the current working directory

=item alarm

The maximum amount of time allowed to index a distribution, in seconds.

Default: 15

=item copy_bad_dists

If set to a true value, copy bad distributions to the named directory
so you can inspect them later.

Default: 0

=item retry_errors

Try to index a distribution even if it was previously tried and
had an error. This depends on previous reports being in C<report_dir>,
so if you don't set that configuration directive, it won't matter.

Default: 1

=item indexer_id

Give yourself a name so people who who ran C<dpan>.

Default: Joe Example <joe@example.com>

=item system_id macbookpro

Give the indexing system a name, just to identify the machine.

Default: 'an unnamed machine'

=item indexer_class 

The Perl class to use as the indexing class. It has to at least
provide a run method. See MyCPAN::Indexer::Tutorial for details
on indexing classes.

Default: MyCPAN::Indexer::DPAN

=item queue_class MyCPAN::Indexer::Queue

The Perl class to use as the queue class. It has to at least
provide a run method. See MyCPAN::Indexer::Tutorial for details
on queue classes.

Default: MyCPAN::Indexer::Queue

=item dispatcher_class 

The Perl class to use as the dispatching class. It has to at least
provide a run method. See MyCPAN::Indexer::Tutorial for details
on dispatching classes.

Default: MyCPAN::Indexer::Dispatcher::Parallel

=item interface_class 

The Perl class to use as the interface class. It has to at least
provide a run method. See MyCPAN::Indexer::Tutorial for details
on interface classes.

Default: MyCPAN::Indexer::Interface::Text

=item worker_class    

The Perl class to use as the worker class. It has to at least
provide a run method. See MyCPAN::Indexer::Tutorial for details
on worker classes.

Default: MyCPAN::Indexer::Worker

=item reporter_class  

The Perl class to use as the reporter class. It has to at least
provide a run method. See MyCPAN::Indexer::Tutorial for details
on reporter classes.

Default: MyCPAN::Indexer::DPAN

=item parallel_jobs 4

The number of parallel jobs to run.

Default: 1

=back

=head1 SEE ALSO

MyCPAN::Indexer, MyCPAN::Indexer::DPAN

=head1 SOURCE AVAILABILITY

This code is in Github:

	git://github.com/briandfoy/mycpan-indexer.git

=head1 AUTHOR

brian d foy, C<< <bdfoy@cpan.org> >>

=head1 COPYRIGHT AND LICENSE

Copyright (c) 2008, brian d foy, All Rights Reserved.

You may redistribute this under the same terms as Perl itself.

=cut