NAME

MetaCPAN::Helper - a MetaCPAN client that provides some high-level helper functions

SYNOPSIS

use MetaCPAN::Helper;

my $helper   = MetaCPAN::Helper->new();
my $module   = 'MetaCPAN::Client';
my $distname = $helper->module2dist($module);
print "$module is in dist '$distname'\n";

DESCRIPTION

This module is a helper class built on top of MetaCPAN::Client, providing methods which provide simple high-level functions for answering common "CPAN lookup questions".

Note: this is an early release, and the interface is likely to change. Feedback on the interface is very welcome.

You could just use MetaCPAN::Client directly yourself, which might make sense in a larger application. This class is aimed at people writing smaller one-off scripts.

METHODS

module2dist( $MODULE_NAME )

Takes the name of a module, and returns the name of the distribution which currently contains that module, according to the MetaCPAN API.

At the moment this will ignore any developer releases, and take the latest non-developer release of the module.

If the distribution name in the dist's metadata doesn't match the name produced by CPAN::DistnameInfo, then be aware that this method returns the name according to CPAN::DistnameInfo. This doesn't happen very often (less than 0.5% of CPAN distributions).

SEE ALSO

MetaCPAN::Client - the definitive client for querying MetaCPAN.

REPOSITORY

https://github.com/CPAN-API/metacpan-helper

CONTRIBUTORS

Neil Bowers

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 the MetaCPAN project.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.