Building simplicidade.org: notes, projects, and occasional rants

Easy yak shaving with git-cpan-init

In a decent sized session of yak shaving, I found a new beautiful tool: git-cpan-init. If need to hack on a CPAN Perl module, git-cpan-init will:

  1. init a new git repository in the current directory;
  2. fetch the module tarball;
  3. unpack it, and commit that version to git, tagging it with the version number.

This leaves you with a ready-to-hack git repo. But it doesn't end there. After you added your fix or feature, you can use git-cpan-sendpatch and this will:

  1. create a patch with your modifications;
  2. create a RT ticket with the patch.

Instant gratification!

So I had no excuse to patch Net::Libdnet to use dnet-config to find the location of the libraries and include files. It was easy as pie.

In the process I also fixed a warning with git-cpan-import, but yannick was already using git to host Git::CPAN::Patch, so it was even easier.