dpan - create a DarkPAN from directories
# from the command line prompt> dpan [-l log4perl.config] [-f config] [directory [directory2]] # get some help prompt> dpan -h prompt> dpan --help
The 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.
dpan
If you don't specify any directories, it works with the current working directory.
At the end, dpan creates a modules directory in the first directory (or the current working directory) and creates the 02package.details.txt.gz and 03modlist.data.gz.
The path to the log4perl configuration file. You can also set this with the <DPAN_LOG4PERL_FILE> environment variable or the log4perl_file configuration directive.
log4perl_file
If you don't specify these values in a configuation file, dpan will use its defaults.
The maximum amount of time allowed to index a distribution, in seconds.
Default: 15
The directory that has the distributions to archive. Remember, this is a subclass of MyCPAN::Indexer::App::BackPAN, so don't worry too much about the directive name.
Default: the current working directory
If set to a true value, copy bad distributions to the named directory so you can inspect them later.
Default: 0
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.
MyCPAN::Indexer::Tutorial
Default: MyCPAN::Indexer::Dispatch::Serial
You can specify another directory that contains pre-indexed reports. dpan will add these reports to its queue to create 02packages.details.txt.gz. So far, dpan doesn't check that these reports correspond to any files in the repository and could cause the checks against 02packages.details.txt.gz to fail.
You probably want to use this as a way to inject information about distributions that you skipped with skip_dists_regexes.
skip_dists_regexes
Delete the report directory before indexing. This cleans out all previous work, so you need to save that on your own. You can also set this with the DPAN_FRESH_START environment variable.
DPAN_FRESH_START
You can tell DPAN to ignore some namespaces. The indexer may still record them, but they won't show up in 02packages.details.txt.gz. It's a space-separated list of exact package names
Default: main MY MM DB bytes DynaLoader
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::App::DPAN::Indexer
Give yourself a name so people who who ran dpan.
Default: Joe Example <joe@example.com>
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
The path to the log4perl configuration file. You can also set this with the <-l> switch or the DPAN_LOG4PERL_FILE environment variable.
DPAN_LOG4PERL_FILE
Take all of the distributions dpan finds and put the into a PAUSE-like structure under authors/id/D/DP/DPAN. You can change the author ID with the pause_id directive.
pause_id
The number of parallel jobs to run. This only matters for dispatcher classes that can do more than one thing at a time.
Default: 1
The author ID to use if organize_dists is set to a true value.
Default: DPAN
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::SkipQueue
If true, supporting reporter classes change the path to the distribution file to be relative to authors/id.
Supported by MyCPAN::App::DPAN::Reporter::Minimal.
MyCPAN::App::DPAN::Reporter::Minimal
Default: true
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::App::DPAN::Reporter::Minimal
Where to store the distribution reports.
Default: a directory named indexer_reports in the current working directory
Try to index a distribution even if it was previously tried and had an error. This depends on previous reports being in report_dir, so if you don't set that configuration directive, it won't matter.
report_dir
You can specify a list of whitespace-separated regexes for dpan to use to filter the queue of distributions to index. You probably want to use this to skip very large distributions. You can have a pre-made index report by setting extra_reports_dir.
extra_reports_dir
This is only supported by MyCPAN::Indexer::SkipQueue.
MyCPAN::Indexer::SkipQueue
Default: null
When set to a true value, skip_perl cause dpan to ignore distributions that match /^(strawberry-?)perl-/, since these can take a long time to index. You can have a pre-made index report by setting extra_reports_dir.
skip_perl
/^(strawberry-?)perl-/
Give the indexing system a name, just to identify the machine.
Default: 'an unnamed machine'
Where to unpack the dists or create any temporary files.
Default: a temp directory in the current working directory
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
You can set the Log4perl levels on each of the components separately:
log4perl.rootLogger = FATAL, Null log4perl.logger.backpan_indexer = DEBUG, File log4perl.logger.Indexer = DEBUG, File log4perl.logger.Worker = DEBUG, File log4perl.logger.Interface = DEBUG, File log4perl.logger.Dispatcher = DEBUG, File log4perl.logger.Queue = DEBUG, File log4perl.logger.Reporter = DEBUG, File
Delete the report directory before indexing. This cleans out all previous work, so you need to save that on your own. You can also set this with the fresh_start configuration directive.
fresh_start
The path to the log4perl configuration file. You can also set this with the <-l> switch of the log4perl_file configuration directive.
MyCPAN::Indexer, MyCPAN::Indexer::DPAN
This code is in Github:
git://github.com/briandfoy/mycpan-indexer.git git://github.com/briandfoy/mycpan--app--dpan.git
brian d foy, <bdfoy@cpan.org>
<bdfoy@cpan.org>
Copyright (c) 2008-2009, brian d foy, All Rights Reserved.
You may redistribute this under the same terms as Perl itself.
To install MyCPAN::App::DPAN, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MyCPAN::App::DPAN
CPAN shell
perl -MCPAN -e shell install MyCPAN::App::DPAN
For more information on module installation, please visit the detailed CPAN module installation guide.