MyCPAN::App::DPAN::Reporter::Minimal - Save the minimum information that dpan needs
Use this in the dpan config by specifying it as the reporter class:
dpan
# in dpan.config reporter_class MyCPAN::App::DPAN::Reporter::Minimal
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.
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.
get_reporter
reporter
See MyCPAN::Indexer::Tutorial for details about what get_reporter expects and should do.
If relative_paths_in_report is true, the reports removes the base path up to author/id.
relative_paths_in_report
Returns the extension for report files.
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
Runs after all the reporting for all distributions has finished. This creates a CPAN::PackageDetails object and stores it as the package_details notes. It store the list of directories that need fresh CHECKSUMS files in the dirs_needing_checksums note.
CPAN::PackageDetails
package_details
dirs_needing_checksums
The checksums and index file creation are split across two steps so that dpan has a chance to do something between the analysis and their creation.
Return the list of interesting reports for this indexing run. This re-runs the queuer to get the final list of distributions in dpan_dir (some things might have moved around), gets the reports for
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.
CPAN::PackageDetails::check_file
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).
Not yet implemented. Otehr code needs to be refactored and show up here.
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.
data
00whois.xml 01mailrc.txt.gz
Walk the repository and extract all of the actual authors in the repo.
Ensure that every PAUSE ID that's in the repository shows up in the authors/01mailrc.txt.gz file. Any new IDs show up with the name from the pause_full_name configuration.
pause_full_name
TO DO: offer a way to configure multiple new IDs
Ensure that every PAUSE ID that's in the repository shows up in the authors/00whois.xml file. Any new IDs show up with the name from the pause_full_name configuration.
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.
How much time do you have?
This code is in Github:
git://github.com/briandfoy/mycpan-app-dpan.git
brian d foy, <bdfoy@cpan.org>
<bdfoy@cpan.org>
Copyright © 2009-2018, brian d foy <bdfoy@cpan.org>. All rights reserved.
You may redistribute this under the terms of the Artistic License 2.0.
To install MyCPAN::App::DPAN, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MyCPAN::App::DPAN
CPAN shell
perl -MCPAN -e shell install MyCPAN::App::DPAN
For more information on module installation, please visit the detailed CPAN module installation guide.