Git::Helpers::CPAN - Get repository information for a CPAN module or release
version 0.000018
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};
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.
Git::Helpers
Git-Helpers
LWP::UserAgent
libwww-perl
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.
string
name
Returns a HashRef of repository information. It might return something like:
HashRef
{ 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.
undef
die
Olaf Alders <olaf@wundercounter.com>
This software is copyright (c) 2015-2018 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.
To install Git::Helpers, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Git::Helpers
CPAN shell
perl -MCPAN -e shell install Git::Helpers
For more information on module installation, please visit the detailed CPAN module installation guide.