NAME - A simple demo that unpacks, builds and tests perl module tarballs.


        $ My-Module-0.01.tar.gz Verby-0.01.tar.gz


As this is not really a useful program, we'll look at how it's written, not how it's used.

Foreach tarball given on the command line, several steps are created, all of them Verby::Step::Closure objects. Each step depends on the step before it.


First the context variable untar_dir is created. This is where all the tarballs will be unpacked to. Because we're so silly, untar_dir is actually set by "cwd" in Cwd, so this is basically a no-op.

It has provide_cxt, meaning that all it's dependant steps and it share a common Verby::Context, separate from other steps.


The next step is to unpack the tarball. The before handler in Verby::Step::Closure will set the tarball context variable to the argument being processed, and the dest context variable to the untar_dir context variable.

The after handler sets the workdir variable to the value of the src_dir variable, and exports workdir so that it's accessible to subsequent steps.


The next thing to do is run the Makefile.PL file. We set workdir to src_dir in the previous step, and that's all we need.


After we've finished running Makefile.PL we can run make(1) with no arguments. This is exactly what this step does. It is also affected by the previously exported workdir.


Now we run make(1) again, but this time with the test target.


Since most actions are asynchroneous, modules will be built in parallel. Isn't that cool?


Yuval Kogman, <>


Copyright 2005-2008 by Infinity Interactive, Inc.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.