Ricardo SIGNES > Dist-Zilla-5.042 > Dist::Zilla::Dist::Builder



Annotate this POD


View/Report Bugs
Module Version: 5.042   Source  


Dist::Zilla::Dist::Builder - dist zilla subclass for building dists


version 5.042



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 distribution. It will include -TRIAL if building a trial distribution, unless the version contains an underscore. 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-*.



This method will consistently build the distribution in a temporary subdirectory. It will return the path for the temporary build location.


  $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:

  keep_build_dir  - if true, don't rmtree the build dir, even if everything
                    seemed to work
  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".

\%arg may be omitted. Otherwise, valid arguments are:

  keep_build_dir  - if true, don't rmtree the build dir, even if everything
                    seemed to work


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

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 all the dist's BuildRunners (unless directed not to, via $arg->{build} = 0), 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 <rjbs@cpan.org>


This software is copyright (c) 2015 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.

syntax highlighting: