SYNOPSIS
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;
DESCRIPTION
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.
new
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_modules
An ArrayRef
of module names which exist currently on CPAN.
cpan_only_modules
An ArrayRef
of module names which exist currently on CPAN but not in your DarkPAN.
darkpan_modules
An ArrayRef
of module names which exist currently on your DarkPAN.
darkpan_only_modules
An ArrayRef
of module names which exist currently on your DarkPAN but not in CPAN.
outdated_modules
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.
cpan_module( $module_name )
my $module = $auditor->cpan_module( 'HTML::Restrict' );
Returns a Parse::CPAN::Packages::Fast::Package object.
darkpan_module( $module_name )
my $module = $auditor->cpan_module( 'HTML::Restrict' );
Returns a Parse::CPAN::Packages::Fast::Package object.