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. Post a comment or leave a trackback: Trackback URL.

One Trackback

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 

© 2009-2013 David Golden All Rights Reserved