text: perlmeditation TGI <p>I'd love to be writing a post called <B>Why I love Dist::Zilla</b>. Maintaining CPAN-style modules has a fair amount of boiler-plate and boring paper-work that must be maintained and fiddled with--it's especially annoying when you make a new module, but every release cycle has its annoyances. [cpan://Dist::Zilla] is intended to help reduce these issues. <p>Granted, I had my doubts about Dist::Zilla going in. I am concerned that it is another powerful, flexible, tool, that will require many hours to really understand and use effectively. Perhaps Dist::Zilla is only a reasonable trade of the the most prolific of CPAN authors. It also has a pretty good sized list of dependencies. We all know all the arguments around dependencies and whether they are a good or bad thing, so I won't rehash them here. <p>So, I love the <i>idea</i> of Dist::Zilla, and I decided give it a whirl. The thing is, I have made two different efforts to install Dist::Zilla and blown several hours each time without getting a usable install. It's really not working out to be a good time trade-off. Frankly, this is not the trouble I was expecting. I was worried about learning curve, not installation. In my previous experience, using modules from top CPAN contributors has not been a problem. Let CPAN.pm hunt down prereqs and BOOOM!-working distro. <p>Dzil is the latest latest thing in Perl, it uses Moose (which I really dig) and a bunch of MooseX modules in innovative ways to produce really clean, maintainable looking code that I can't install. The first time I tried to use it I gave up while trying to install MooseX::Types. It's been a long time, I don't remember all the related versions and everything. I decided to give it another go. <p>This time, I spent a lot of time diving through big long blobs of TAP output to find modulues that broke and look for dependencies that might not be properly reported. <p>So far, trying to install Dist::Zilla 4.200006 with Moose 2.0002 (already installed) has been painful, I spent quite a while fetching and building a big pile of prerequisites. That done, I started getting test failures. <p>I've had to install several modules manually after grubbing in TAP output and module source. Each one gets me a bit closer. <p>I can't recall everything that I've had to do, (my 10,000 line scrollback buffer overflowed). But I know I had and tracked down these issues: <ul> <li>MooseX::OneArgNew -> failed due to me having namespace::autoclean 0.11 instead of namespace::autoclean 0.12 installed. This was easy to track down since it was called out in a clear message: <c> t/basic.t ............... Couldn't load class (MooseX::OneArgNew) because: Undefined subroutine &namespace::autoclean::on_scope_end called at /Users/toad/perl5/lib/perl5/namespace/autoclean.pm line 57. BEGIN failed--compilation aborted at /Users/toad/.cpan/build/MooseX-OneArgNew-0.001-mHVvqm/blib/lib/MooseX/OneArgNew.pm line 11. Compilation failed in require at /Users/toad/perl5/lib/perl5/darwin-thread-multi-2level/Class/MOP.pm line 117. at /Users/toad/perl5/lib/perl5/darwin-thread-multi-2level/Class/MOP.pm line 123 Class::MOP::__ANON__('Undefined subroutine &namespace::autoclean::on_scope_end call...') called at /Users/toad/perl5/lib/perl5/Try/Tiny.pm line 100 </c> <li>Role::HasMessage -> installed properly after I updated namespace::autoclean. <li>As did Config::MVP <li>This got me to Dist::Zilla::MVP::RootSection failing the compile.t:<c> # Failed test 'require Dist::Zilla::MVP::RootSection;' # at t/compile.t line 17. # Tried to require 'Dist::Zilla::MVP::RootSection'. # Error: Could not create the 'reader' method for zilla because : The method '_inline_store' was not found in the inheritance hierarchy for Moose::Meta::Class::__ANON__::SERIAL::10 at /Users/toad/perl5/lib/perl5/darwin-thread-multi-2level/Class/MOP/Class.pm line 1034 # Class::MOP::Class::__ANON__('Moose::Meta::Class=HASH(0x1022490b8)', '_inline_store') called at /Users/toad/perl5/lib/perl5/darwin-thread-multi-2level/Class/MOP/Class.pm line 1079 # Class::MOP::Class::add_around_method_modifier('Moose::Meta::Class=HASH(0x1022490b8)', '_inline_store', 'CODE(0x1022387d8)') called at /Users/toad/perl5/lib/perl5/darwin-thread-multi-2level/Moose/Meta/Role/Application/ToClass.pm line 222 .... AND MUCH MUCH MORE ... </c> <li>Looking at the source of Dist::Zilla::MVP::RootSection, I saw, MooseX::LazyRequire listed in a use line, so I tried to install it. (it was not installed). Still Dist::Zilla won't build. </ul> <P>Later on I'll keep looking and trying to install Dist::Zilla. <p>So, Dist::Zilla has been an entirely negative experience. Not all of it is due to errors on the part of DZ's authors. <p>Lessons I take from this experience: <ul> <li>Dependencies are NOT free. This is an old chestnut, It's been well discussed to death. This experience showed me another failure mode. <li>There needs to be a way to easily choke off pendantic test output. Also, it would be nice if you could set a "fail fast" mode where we skip all remaining tests on the first failure. <li>Moose really needs to do something about its error messages. [stvn] and crew already know about this and would like to fix it, but it isn't a simple problem. <li>The cleanest, clearest, most elegant code in the world is useless if I can't run it. </ul> <p><B>Update:</B><p> I installed MooseX::SetOnce and then Dist::Zilla finally installed. Here's hoping that in a week or two I'll be able to write a meditation called "Why I love Dist::Zilla". <!-- Node text goes above. Div tags should contain sig only --> <div class="pmsig"><div class="pmsig-25825"> <P><BR>TGI says <B>moo</B></P> </div></div>