Hacking Thy Fearful Symmetry

N&I: Git::CPAN::Patch now detect repositories

November 11th, 2011
PerlNew and ImprovedGit::CPAN::Patch

N&I: Git::CPAN::Patch now detect repositories

New and Improved!

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:

#syntax: bash
$ 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:

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

        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
Seen a typo or an error? Submit an edit on GitHub!