NAME
Git::Helpers::CPAN - Get repository information for a CPAN module or release
VERSION
version 1.000001
SYNOPSIS
my $by_module = Git::Helpers::CPAN->new( name => 'Git::Helpers' );
print $by_module->repository->{web};
my $by_release = Git::Helpers::CPAN->new( name => 'Git::Helpers' );
print $by_release->repository->{web};
CONSTRUCTOR ARGUMENTS
name
Can be either the name of a CPAN module or a CPAN release. In the case of this module, you could either search for Git::Helpers
or Git-Helpers
. For other modules, keep in mind that the release name may not map well to the module name. For example LWP::UserAgent
and libwww-perl
.
METHODS
release_name
Returns a string
which is the actual release name the search is performed on. Mostly helpful for debugging. It will match your original name
arg except when you've provided a module name. In that case this will return the name of the release which the module maps to.
repository
Returns a HashRef
of repository information. It might return something like:
{
type => 'git',
url => 'https://github.com/oalders/git-helpers.git',
web => 'https://github.com/oalders/git-helpers',
}
This is essentially the data structure which is returned by the MetaCPAN API, so it *could* change if/when the MetaCPAN API changes output formats.
This method returns undef
if the release was found but does not provide any repository information. It will die
if the release cannot be found via the MetaCPAN API.
AUTHOR
Olaf Alders <olaf@wundercounter.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2015 by Olaf Alders.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.