Teach Makefile.PL to use cpanm

I like to keep my perl modules lean when it comes to dependencies. But then again, CPAN is just so wonderful with all the helpful packages available. So there are always dependencies.

When writing perl modules, more often than not a few dependencies creep in … which makes it a whee bit awkward when developing the module, because I then have to somehow install these dependencies, and I would rather not get them all over the place but neatly in the module directory so that I have at least a semblance of a stable development environment.

So here goes my solution: A little postamble method for my Makefile.PL.

Details on Medium


Can you clarify what you mean by "I would rather not get them all over the place"? What is wrong with simply installing these dependencies into the normal perl environment? Presumably you are developing a module you plan to use, so you will be installing those dependencies anyway when you release your distribution to the CPAN and then want to install it.

That's really cool and looks useful!

Leave a comment

About Tobi Oetiker

user-pic In pursuit or happiness