OS-specific prerequisites with Dist::Zilla

One of my long-standing annoyances with Dist::Zilla was that it didn't have means for doing OS-specific prerequisites. I had put off converting some distributions to Dist::Zilla because of that, but finally got off my duff and wrote Dist::Zilla::Plugin::OSPrereqs to do what I want.

It works like this in your dist.ini:

[OSPrereqs / MSWin32]
Win32API::File = 0.10

That puts a conditional clause in the Makefile.PL that only adds the prerequisite for the given operating system. It's a bit of a crude hack, but appears to work.

Now even more things I maintain can be streamlined the Dist::Zilla way! Awesome!

This entry was posted in dzil, perl programming and tagged , . Bookmark the permalink. Both comments and trackbacks are currently closed.

One Trackback

© 2009-2014 David Golden All Rights Reserved