Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Burned by Dist::Zilla

by Tommy (Chaplain)
on Jan 03, 2013 at 17:20 UTC ( #1011490=perlquestion: print w/replies, xml ) Need Help??

Tommy has asked for the wisdom of the Perl Monks concerning the following question:


I admit that I still have to figure out exactly where the arcane error messages in the tests results are coming from, but I've never FAILed so miserably in CPAN testers results since I migrated to Dist::Zilla. Pfft. Wow, ever since I released using Dist::Zilla and its supposed AutoPrereqs core plugin, everything has gone down in a firey blaze of embarrassment. Causality fallacy? It remains to be seen... UPDATE: no, it wasn't.

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"

Replies are listed 'Best First'.
Re: Burned by Dist::Zilla
by Corion (Pope) on Jan 03, 2013 at 17:44 UTC

    In all seriousness, maybe that could be taken as a hint to remove AutoLoader and the corresponding __END__ line?

    But yes, prerequisites are something that I wouldn't automate as prerequisites don't change that often, but when the detection fails, the fallout is much harder.

      ...And/or Dist::Zilla shouldn't claim to automatically detect all Prereqs? I'll be filing a bug report. I do not take this as a mandate to remove autoloading a heavy routine that is only ever used when handling exceptions which should all be worked out by the time any code hits production...

      Sorry for being snippy. I'm really pissed off that I put out a "stable" release that proceeded to fail nearly all tests (except mine of course). Having done so is not merely an embarrassment, but a disservice to the community! GAAAA!

      Lesson learned: test in a virgin Perl environment that has nothing but core modules installed, and don't automate prereq detection.

      "Perl follows the principle of least astonishment"

        Ah, yes, I do run tests in a Perl installation that has just enough modules for "my" modules to work, for that reason. And no, I'm not a fan of Dist::Zilla, because at least for me, it automates too many things that I prefer to mess up manually.

Re: Burned by Dist::Zilla
by BrowserUk (Pope) on Jan 03, 2013 at 18:26 UTC

    You made a fundamental logic error my friend. You bought (into) a product bearing the -zilla' suffix.

    Other than Mozilla, which does stirling work as my backup browser, my inherent aversion to any product with that (and many other forms of) cutesy, sick-making naming convention has stood me in good stead so far :)

    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1011490]
Approved by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (2)
As of 2019-08-20 01:32 GMT
Find Nodes?
    Voting Booth?
    If you were the first to set foot on the Moon, what would be your epigram?

    Results (142 votes). Check out past polls.