MyCPAN::Indexer::Reporter::Base - Common bits for MyCPAN reporter classes
Use this as a base class in you reporter classes. Extend or override the parts that you need.
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.
get_report_file_extension
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.
{success|error}_report_subdir
You should probably leave this alone.
Return the subdirectory under the report_dir for the report, depending on the success of the indexing.
Returns the filename portion of the report path based on the examined distribution name.
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.
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.
get_report_filename
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.
This code is in Github:
git://github.com/briandfoy/mycpan-indexer.git
brian d foy, <bdfoy@cpan.org>
<bdfoy@cpan.org>
Copyright (c) 2008-2010, brian d foy, All Rights Reserved.
You may redistribute this under the same terms as Perl itself.
To install MyCPAN::Indexer, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MyCPAN::Indexer
CPAN shell
perl -MCPAN -e shell install MyCPAN::Indexer
For more information on module installation, please visit the detailed CPAN module installation guide.