NAME
MyCPAN::Indexer::DPAN - Create a D(ark)PAN out of the indexed distributions
SYNOPSIS
use MyCPAN::Indexer;
DESCRIPTION
This module implements the indexer_class and reporter_class components to allow backpan_indexer.pl
to create a CPAN-like directory structure with its associated index files. This application of MyCPAN::Indexer is specifically aimed at creating a 02packages.details file, so it strives to collect a minimum of information.
It runs through the indexing and prints a report at the end of the run.
Indexer class
- examine_dist_steps
-
Returns the list of techniques that
examine_dist
should use to index distributions. See the documentation inMyCPAN::Indexer::examine_dist_steps
.For DPAN, unpack the dist, ensure you are in the dist directory, the find the modules.
- find_modules_techniques
-
Returns the list of techniques that
find_modules
should use to look for Perl module files. See the documentation inMyCPAN::Indexer::find_modules
. - get_module_info_tasks
-
Returns the list of techniques that
get_module_info
should use to extract data from Perl module files. See the documentation inMyCPAN::Indexer::get_module_info
. - setup_run_info
-
Like
setup_run_info
inMyCPAN::Indexer
, but it remembers fewer things. The DarkPAN census really just cares about finding packages, so the details about the run aren't as interesting. - setup_dist_info
-
Like
setup_dist_info
inMyCPAN::Indexer
, but it remembers fewer things. The test census really just cares about statements in the test files, so the details about the distribution aren't as interesting.
Reporter class
- get_reporter( $Notes )
-
Inherited for MyCPAN::App::BackPAN::Indexer
- final_words( $Notes )
-
get_reporter
sets thereporter
key in the$Notes
hash reference. The value is a code reference that takes the information collected about a distribution and counts the modules used in the test files.See MyCPAN::Indexer::Tutorial for details about what
get_reporter
expects and should do.This is the big problem. Since we didn't really parse the source code, we don't really know how to match up packages and VERSIONs. The best we can do right now is assume that a $VERSION we found goes with the packages we found.
Additionally, that package variable my have been in one package, but been the version for another package. For example:
package DBI; $DBI::PurePerl::VERSION = 1.23;
- guess_package_name
-
Given information about the module, make a guess about which package is the primary one. This is
- get_package_version( MODULE_INFO, PACKAGE )
-
Get the $VERSION associated with PACKAGE. You probably want to use
guess_package_name
first to figure out which package is the primary one that you should index. - skip_package( PACKAGE )
-
Returns true if the indexer should ignore PACKAGE.
By default, this skips the Perl special packages:
main MY MM DB bytes
There isn't a way to configure additional packages yet.
- create_package_details
-
Not yet implemented. Otehr code needs to be refactored and show up here.
- create_modlist
-
If a modules/03modlist.data.gz does not already exist, this creates a placeholder which defines the CPAN::Modulelist package and the method
data
in that package. Thedata
method returns an empty hash reference. - create_checksums
-
Creates the CHECKSUMS file that goes in each author directory in CPAN. This is mostly a wrapper around CPAN::Checksums since that already handles updating an entire tree. We just do a little logging.
TO DO
SOURCE AVAILABILITY
This code is in Github:
git://github.com/briandfoy/mycpan-indexer.git
AUTHOR
brian d foy, <bdfoy@cpan.org>
COPYRIGHT AND LICENSE
Copyright (c) 2008-2009, brian d foy, All Rights Reserved.
You may redistribute this under the same terms as Perl itself.