App-TaskBuilder
view release on metacpan or search on metacpan
lib/App/TaskBuilder.pm view on Meta::CPAN
NAME => '{{mod_name}}',
VERSION_FROM => '{{mod_file}}',
ABSTRACT => 'install dependencies for {{mod_name}}',
PREREQ_PM => {{requires}},
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
clean => { FILES => '{{dist_name}}-*' },
);
END
'MANIFEST' => <<'END',
Makefile.PL
README
{{mod_file}}
END
'README' => <<'END',
This is an automatically generated README for {{mod_name}}.
END
$v{mod_file} => <<'END',
package
{{mod_name}};
${{mod_name}}::VERSION =
{{version}};
1;
END
};
}
1;
__END__
=head1 NAME
App::TaskBuilder - build empty, dependency-only distributions
=head1 VERSION
version 1.000
=head1 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'
=head1 DESCRIPTION
Naming a package C<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.
=head1 PARAMETERS
=head2 name
The name of the Task module to generate. (Despite referring to C<Task>
throughout this documentation, any module name can be used; it doesn't have to
start with C<Task::>.)
=head2 version
The version (module and distribution) to generate.
=head2 output
The output file to write. Defaults to C<$name-$version.tar.gz>.
=head2 require
A hashref of module names and their versions.
=head2 include
A list of files to include data from. Each one is loaded with C<do>. It
should return a hashref with any of the following keys: C<requires>,
C<build_requires>, C<test_requires>. Any that are found will be merged
together with the hashref passed in as the C<require> parameter.
Currently, everything gets written to the Makefile.PL as a normal dependency;
TaskBuilder doesn't actually distinguish between build/test/install
dependencies.
=head1 FILES
TaskBuilder generates the following files:
=head2 Makefile.PL
=head2 README
=head2 (your task module)
This file contains a package statement for your module and a C<$VERSION>, so it
can be depended on by other distributions.
=head1 METHODS
=head2 new
my $tb = App::TaskBuilder->new(%opt);
Create a new TaskBuilder object. See L</PARAMETERS>.
=head2 vars
my %vars = $tb->vars;
A hash of variables suitable for passing to a template, which is what
TaskBuilder does with this internally.
( run in 1.260 second using v1.01-cache-2.11-cpan-b16cb0d3907 )