Git::CPAN::Patch now detect repositories

Posted in: Technical Track

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

Interested in working with Yanick? Schedule a tech call.

No comments

Leave a Reply

Your email address will not be published. Required fields are marked *