NAME
App::TaskBuilder - build empty, dependency-only distributions
VERSION
version 1.000
SYNOPSIS
use App::TaskBuilder;
App::TaskBuilder->new(%opt)->run;
# or, more likely
task-builder --name Task::Foo --version 0.123 --require Some::Module=1.01
# writes 'Task-Foo-0.123.tar.gz'
DESCRIPTION
Naming a package Task::Something
is a convention for distributions that exist only to make sure that a certain set of modules is installed.
Building these Task distributions by hand is a pain. App::TaskBuilder automates the process, giving you a tarball that you can then upload, manipulate with CPAN/CPANPLUS, etc.
PARAMETERS
name
The name of the Task module to generate. (Despite referring to Task
throughout this documentation, any module name can be used; it doesn't have to start with Task::
.)
version
The version (module and distribution) to generate.
output
The output file to write. Defaults to $name-$version.tar.gz
.
require
A hashref of module names and their versions.
include
A list of files to include data from. Each one is loaded with do
. It should return a hashref with any of the following keys: requires
, build_requires
, test_requires
. Any that are found will be merged together with the hashref passed in as the require
parameter.
Currently, everything gets written to the Makefile.PL as a normal dependency; TaskBuilder doesn't actually distinguish between build/test/install dependencies.
FILES
TaskBuilder generates the following files:
Makefile.PL
README
(your task module)
This file contains a package statement for your module and a $VERSION
, so it can be depended on by other distributions.
METHODS
new
my $tb = App::TaskBuilder->new(%opt);
Create a new TaskBuilder object. See "PARAMETERS".
vars
my %vars = $tb->vars;
A hash of variables suitable for passing to a template, which is what TaskBuilder does with this internally.
run
$tb->run;
Run the application and write the output distribution file.
CAVEATS
TaskBuilder uses your tar
binary instead of Archive::Tar. If this bothers you, write a patch to use Archive::Tar when it's available. I'd like to avoid non-core dependencies, though, since I originally wrote this as part of an automated dependency installer for a (non-CPAN, non-Makefile.PL) project.
AUTHOR
Hans Dieter Pearcey <hdp@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2008 by Hans Dieter Pearcey <hdp@cpan.org>.
This is free software; you can redistribute it and/or modify it under the same terms as perl itself.