my $auditor = OrePAN2::Auditor->new( cpan => 'https://cpan.metacpan.org/modules/02packages.details.txt', darkpan => '/full/path/to/darkpan/02packages.details.txt' ); # ArrayRef of module names my $outdated_modules = $auditor->outdated_modules;
BETA BETA BETA
OrePAN2 is a well established set of code, but this is a very recent edition. Please don't rely on the API remaining stable a this point.
If you have a local DarkPAN or MiniCPAN or something which has its own 02packages.txt file, it can be helpful to know which files are outdated or which files exist in your DarkPAN, but not on CPAN (or vice versa). This module makes this easy for you.
Think of it as a way of diffing 02packages files.
my $auditor = OrePAN2::Auditor->new( cpan => 'https://cpan.metacpan.org/modules/02packages.details.txt', darkpan => '/full/path/to/darkpan/02packages.details.txt' );
The cpan and darkpan args are the only required arguments. These can either be a path on your filesystem or a full URL to the 02packages files which you'd like to diff.
cpan
darkpan
An ArrayRef of module names which exist currently on CPAN.
ArrayRef
An ArrayRef of module names which exist currently on CPAN but not in your DarkPAN.
An ArrayRef of module names which exist currently on your DarkPAN.
An ArrayRef of module names which exist currently on your DarkPAN but not in CPAN.
An ArrayRef of module names which exist currently on both your DarkPAN and on CPAN and for which the module in your DarkPAN has a lower version number.
my $module = $auditor->cpan_module( 'HTML::Restrict' );
Currently returns a Parse::CPAN::Packages::Package object, but this could change.
I've tried, for the most part, not to expose the underlying parsers in the API of this module. cpan_module and darkpan_module are currently the exception. I may at some point replace them with OrePAN2 objects which do something similar but with different APIs. I'm exposing them now in order to make this object a little easier to work with and to get some feedback.
cpan_module
darkpan_module
To install OrePAN2, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OrePAN2
CPAN shell
perl -MCPAN -e shell install OrePAN2
For more information on module installation, please visit the detailed CPAN module installation guide.