|No such thing as a small change|
Burned by Dist::Zillaby Tommy (Chaplain)
|on Jan 03, 2013 at 17:20 UTC||Need Help??|
Tommy has asked for the
wisdom of the Perl Monks concerning the following question:
Can't say I wasn't warned, certain Monks expressed concern about Dist::Zilla in other threads, but I was lured in by the shiny new hawtness. Now I have to figure out how to make my code work with Dist::Zilla since Dist::Zilla doesn't work with my code (which otherwise didn't utterly fail tests like it is now).
It's because dzil didn't detect that Exception::Handler was a prereq it seems, and It's probably because it's require'd in an eval after the __END__ block in an AutoLoad'ed manner. I took for granted that dzil knew what it was doing when it said it detected *all* prerequisites. Bah. Fail. Not even Perl can parse Perl, right?
Failing code queued for removal from CPAN, new release uploaded
Dist::Zilla detects prerequisites via its AutoPrereqs plugin, which depends on PPI. PPI is awesome, but like the Perl compiler it doesn't find code that appears after an __END__ block. This is why dzil didn't find my prereq. Fair enough. I spoke with the author of dzil and submitted a documentation patch. My patch was not accepted, however another patch was applied to the effect that one should double check one's prereqs in the builds created by Dist::Zilla. That works for me! Now the documentation is clear about the fact that you still need to be careful and not blindly trust the auto-detection, which necessary caution I blissfully abandoned when I should have known better. The author of dzil, RJBS, is a decent and classy person. That is all.
UPDATE 4 (the last one, I promise)
Mon Jan 21 11:20:44 CST 2013 -- After that turbulent start, Dist::Zilla and I are getting along marvelously. Unfortunately the start was much more turbulent than I could meekly tolerate. However I am now happy to report that I am getting loads of usefulness and increased development efficiency out of the tool. Admittedly you must still be vigilant in reviewing what it produces with its vast array of pluggable automation. But overall, I'm happy to be using it now. Proof is in the puddin'
"Perl follows the principle of least astonishment"