Dear lazyweb - when I try out a distribution converted to DistZilla I often discover that I don't have all the plugins used there. Starting the work then consists of a string of 'dzil build' commands, searching the monstrous error stacks for the name of the missing plugin and then running cpan with it. Sure that should be automated!
And, by the way, it could also install the distribution's prerequisites.
Update: Repeating one of the comments - apparently the latest Dist::Zilla supports following solution
dzil authordeps | cpanm
.
7 comments:
It would be nice if we could get rid of either Tasks or PluginBundle's and have some cpan metadata that said required for development or something... (like required for tests)
I have the same problem with Module::Install. There's currently no easy way to bootstrap it for developers. Typically I use my "Task::BeLike::JJNAPIORK" module for that and limit my plugin usage for Module::Install to a handful of things that I bootstrap with that. Its not ideal solution by any means, but I guess for now it's not too bad, just a bit confusing and magical to newcomers.
Have you checked out Task::Dist::Zilla? It tries to "install dist-zilla and all its plugins". It failed pretty hard when I tried it (for the same reason) but maybe you'll have better luck.
@xeno - I agree that Tasks and Bundles only add to the clutter, but adding this to cpan metadata would not work in the cases (quite frequent I think) when people let dzil produce the metadata file. It needs to be an additional dzil command I think - 'bootstrap' maybe?
@himura - sure I know about Tasks and Bundles - but they would not work if someone develops his own plugin and puts it on CPAN and then uses it in his projects.
@zby I think cpan metadata could work.... unfortunately it won't be an option anytime soon.
but the bootstrap thing isn't too bad of an idea. you could make a bootstrap plugin that deps on cpanm which feeds the modules to cpanm to install.
Maybe I'll write that after I finish my relocating ~ 2 weeks. If someone else doesn't beat me to it.
dzil authordeps
Available in the latest version of Dist::Zilla, 4.102341, at http://search.cpan.org/dist/Dist-Zilla/.
Just dzil authordeps | cpanm and you're done.
I use my own dzil plugin module that includes all the plugins that I want. This has two advantages. First, installing your own module with cpanm installs all the dependencies. Second, whenever you change your preferred configuration, all the modules that you have already minted receive the changes, without you going through and updating all their dist.ini files.
Post a Comment