NAME

MyCPAN::App::DPAN::Reporter::AsYAML - Record the indexing results as YAML

SYNOPSIS

Use this in the dpan config by specifying it as the reporter class and the collator class:

        # in dpan.config
        reporter_class  MyCPAN::App::DPAN::Reporter::AsYAML
        collator_class  MyCPAN::App::DPAN::Reporter::AsYAML

DESCRIPTION

This module implements the reporter_class components to allow dpan to create a CPAN-like directory structure with its associated index files. It runs through the indexing, saves the reports as YAML, and prints a report at the end of the run.

Methods

get_reporter

Inherited from MyCPAN::App::BackPAN::Indexer

get_collator

This Reporter class also implements its Collator since the two are coupled by the report format. It's a wrapper around final_words, which previously did the same thing.

final_words

Creates the 02packages.details.txt.gz and CHECKSUMS files once dpan has analysed every distribution.

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

NOT YET IMPLEMENTED

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.

NOT YET IMPLEMENTED

skip_package( PACKAGE )

Returns true if the indexer should ignore PACKAGE.

By default, this skips the Perl special packages specified by the ignore_packages configuration. By default, ignore packages is:

        main
        MY
        MM
        DB
        bytes
        DynaLoader

To set a different list, configure ignore_packages with a space separated list of packages to ignore:

        ignore_packages main Foo Bar::Baz Test

Note that this only ignores those exact packages. You can't configure this with regex or wildcards (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. The data 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.

SOURCE AVAILABILITY

This code is in Github:

        git://github.com/briandfoy/mycpan-app-dpan.git

AUTHOR

brian d foy, <bdfoy@cpan.org>

COPYRIGHT AND LICENSE

Copyright © 2010-2018, brian d foy <bdfoy@cpan.org>. All rights reserved.

You may redistribute this under the terms of the Artistic License 2.0.