MyCPAN::App::DPAN::Reporter::Minimal - Save the minimum information that dpan needs


NAME

MyCPAN::App::DPAN::Reporter::Minimal - Save the minimum information that dpan needs


SYNOPSIS

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

        # in dpan.config
        reporter_class  MyCPAN::App::DPAN::Reporter::Minimal


DESCRIPTION

This class takes the result of examining a distribution and saves only the information that dpan needs to create the PAUSE index files. It's a very small text file with virtually no processing overhead compared to YAML.

Methods

get_reporter

get_reporter sets the reporter key in the notes. The value is a code reference that takes the information collected about a distribution and dumps it as a YAML file.

See the MyCPAN::Indexer::Tutorial manpage for details about what get_reporter expects and should do.

Try this before we get this far

                        unless( exists $dist_file )
                                {
                                # What directory am I in?
                                $logger->warn( "Dist file [$dist_file] not found in DPAN" );
                                next PACKAGE;
                                }
                        =end
                        
get_latest_module_reports

Return the list of interesting reports for this indexing run. This re-runs the queuer to get the final list of distributions in backpan_dir (some things might have moved around), gets the reports for

create_index_files

Creates the 02packages.details.txt.gz and 03modlist.txt.gz files. If there is a problem, it logs a fatal message and returns nothing. If everything works, it returns true.

It initially creates the 02packages.details.txt.gz as a temporary file. Before it moves it to its final name, it checks the file with CPAN::PackageDetails::check_file to ensure it is valid. If it isn't, it stops the process.

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.


TO DO


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 (c) 2009, brian d foy, All Rights Reserved.

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

 MyCPAN::App::DPAN::Reporter::Minimal - Save the minimum information that dpan needs