Install Distros Under Development Locally


Suppose you like Dist::Zilla and cpanminus. Suppose you also need to install the new version of a distribution you're working on locally. (I do this all the time.)

Sure, you can use dzil install, which builds, tests, and installs the distribution. That's too slow though—by the time the normal CPAN shell has loaded its indexes, cpanm has often finished.

I've already spent more time writing this post than it took to write this silly little shell alias:

alias dzinstall='dzil build; cpanm install *.tar.gz; dzil clean'

Sure, you have to manage your distro with dzil and you have to have cpanm configured to use the correct Perl and you can't have any other tarballs in your directory, but this works really well for me.


Why not just use the built in dzil install?

alias dzinstall='dzil install --install-command "cpanm ."'

"dzil install" does have an "--install-command" option, which allows you to specify an alternative command to use for installation - "dzil install --install-command 'cpanm .'" would be pretty much equivalent to your alias.

dzil will probably switch to defaulting to cpanm once I provide a useful mechanism for stating your cpan client pref more globally in the future

i.e., "someday beyond tomorrow"

I will now! I'd never thought to read the documentation for Dist::Zilla::App::Command::install.

Modern Perl: The Book

cover image for Modern Perl: the book

The best Perl Programmers read Modern Perl: The Book.

sponsored by the How to Make a Smoothie guide



About this Entry

This page contains a single entry by chromatic published on February 16, 2012 5:25 PM.

Experts versus Novices was the previous entry in this blog.

Upgrading User Password Hashes in Place is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by the Perl programming language

what is programming?