Dist::Zilla::Dist::Builder(3) dist zilla subclass for building dists


version 4.300020



This is the Path::Class::Dir, if any, in which the dist has been built.



  my $zilla = Dist::Zilla->from_config(\%arg);

This routine returns a new Zilla from the configuration in the current working directory.

This method should not be relied upon, yet. Its semantics are certain to change.

Valid arguments are:

  config_class - the class to use to read the config
                 default: Dist::Zilla::MVP::Reader::Finder



This method builds the distribution in the given directory. If no directory name is given, it defaults to DistName-Version. If the distribution has already been built, an exception will be thrown.


This method just calls "build_in" with no arguments. It gets you the default behavior without the weird-looking formulation of "build_in" with no object for the preposition!



This method behaves like "build_in", but if the dist is already built in $root (or the default root, if no root is given), no exception is raised.


This method just calls "ensure_built_in" with no arguments. It gets you the default behavior without the weird-looking formulation of "ensure_built_in" with no object for the preposition!


  my $basename = $zilla->dist_basename;

This method will return the dist's basename (e.g. "Dist-Name-1.01". The basename is used as the top-level directory in the tarball. It does not include "-TRIAL", even if building a trial dist.


  my $tarball = $zilla->archive_filename;

This method will return the filename (e.g. "Dist-Name-1.01.tar.gz") of the tarball of this dist. It will include "-TRIAL" if building a trial dist. The tarball might not exist.



This method will ensure that the dist has been built, and will then build a tarball of the build directory in the current directory.



This method releases the distribution, probably by uploading it to the CPAN. The actual effects of this method (as with most of the methods) is determined by the loaded plugins.


This method removes temporary files and directories suspected to have been produced by the Dist::Zilla build process. Specifically, it deletes the .build directory and any entity that starts with the dist name and a hyphen, like matching the glob "Your-Dist-*".


  $zilla->install( \%arg );

This method installs the distribution locally. The distribution will be built in a temporary subdirectory, then the process will change directory to that subdir and an installer will be run.

Valid arguments are:

  install_command - the command to run in the subdir to install the dist
                    default (roughly): $^X -MCPAN -einstall .
                    this argument should be an arrayref



This method builds a new copy of the distribution and tests it using "run_tests_in".


  my $error = $zilla->run_tests_in($directory);

This method runs the tests in $directory (a Path::Class::Dir), which must contain an already-built copy of the distribution. It will throw an exception if there are test failures.

It does not set any of the *_TESTING environment variables, nor does it clean up $directory afterwards.


  $zilla->run_in_build( \@cmd );

This method makes a temporary directory, builds the distribution there, executes the dist's first BuildRunner, and then runs the given command in the build directory. If the command exits non-zero, the directory will be left in place.


Ricardo SIGNES <[email protected]>


This software is copyright (c) 2012 by Ricardo SIGNES.

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