Git::CPAN::Patch now detect repositories

Nov 14, 2011 / By Yanick Champoux

Tags: ,

Git::CPAN::Patch could already seed a local repository with the latest distribution of a module, or its whole BackPAN history, or its GitPAN mirror. But with version 0.7.0, it can now go straight for the meat and clone the distribution’s officil git repository, provided that it’s specified in its META.json or META.yml. Please allow me to demonstrate:

$ mkdir local && cd local

$ git cpan-init --vcs Git::CPAN::Patch
repository found: git://github.com/yanick/git-cpan-patch.git
Branch master set up to track remote branch master from cpan.

$ ls
bin       Changes        contrib   dist.ini       distrelease.yml
lib       Makefile.PL    MANIFEST  MANIFEST.SKIP  README
t         xt

To help figure out if a distribution has a repository or not, one can use the new helper command git cpan-sources:

$ git cpan-sources Git::CPAN::Patch
Repository
        type: git
        url: git://github.com/yanick/git-cpan-patch.git
        web: http://github.com/yanick/git-cpan-patch/tree

CPAN
        latest release: 0.6.1 (2011-06-05)
        url: http://cpan.cpantesters.org/authors/id/Y/YA/YANICK/Git-CPAN-Patch-0.6.1.tar.gz

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>