The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

MyCPAN::Indexer::Reporter::Base - Common bits for MyCPAN reporter classes

SYNOPSIS

Use this as a base class in you reporter classes. Extend or override the parts that you need.

DESCRIPTION

This is a base class for MyCPAN reporters. It mostly deals with file and directory names that it composes from configuration and run details. Most things should just use what is already there.

There is one abstract method that a subclass must implement on its own. The get_report_file_extension methods allows each reporter to have a unique extension by which it can recognize its own reports.

Methods

get_report_path( $info, $Notes )

Returns the path of the file that stores the run results. It puts together the configuration for the {success|error}_report_subdir, the distribution name, and the distribution extension.

You should probably leave this alone.

get_report_subdir

Return the subdirectory under the report_dir for the report, depending on the success of the indexing.

get_report_filename

Returns the filename portion of the report path based on the examined distribution name.

You should probably leave this alone.

get_report_file_extension

Returns the filename portion of the report path based on the examined distribution name. This is an abstract method which you must override.

Every reporter should chose their own extension. This allows each reporter to recognize their previous results.

get_successful_report_path

Returns the filename for a successful report. This is slightly different from get_report_filename which might also return the filename for an error report.

check_for_previous_successful_result( $info, $Notes )

Returns false (!) if it looks like there is already a successful report for the noted distribution. If there is not a successful report, it returns the filename it expected to find.

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.