ExtUtils-ModuleMaker-TT
view release on metacpan or search on metacpan
lib/ExtUtils/ModuleMaker/TT.pm view on Meta::CPAN
ExtUtils::ModuleMaker::TT - Makes skeleton modules with Template Toolkit templates (UNMAINTAINED)
=head1 VERSION
version 0.94
=head1 UNMAINTAINED
This distribution is no longer maintained as the author no longer uses or
recommends it. If you wish to take it over, please contact the author.
=head1 SYNOPSIS
use ExtUtils::ModuleMaker;
my $mmtt = ExtUtils::ModuleMaker->new (
NAME => 'My::New::Module',
ALT_BUILD => 'ExtUtils::ModuleMaker::TT',
TEMPLATE_DIR => '~/.perltemplates',
);
$mmtt->complete_build();
=head1 DESCRIPTION
I<Note: ExtUtils::ModuleMaker has changed substantially in recent releases
and ExtUtils::ModuleMaker::TT has similarly changed substantially to be
compatible with these changes. Please report any bugs you may find.>
This module extends L<ExtUtils::ModuleMaker> to use Template Toolkit 2 (TT2) to
build skeleton files for a new module. Templates may either be default
templates supplied within the module or user-customized templates in a
directory specified with the I<TEMPLATE_DIR> parameter.
Summary of Features/Enhancements:
=over 4
=item *
Supports building full module skeletons with all the functionality of
C<ExtUtils::ModuleMaker>
=item *
Supports adding a single .pm file (and corresponding .t file) to an existing
module distribution tree
=item *
Supports creating skeleton text for a single method (generally to be called via
a script from within your favorite editor)
=item *
Creates a template directory containing the default templates for subsequent
user customization
=item *
Templates can access any parameter in the ExtUtils::ModuleMaker object (e.g.
$mmtt, above). This supports transparent, user-extensible template variables
for use in custom templates
=item *
Included command-line program I<makeperlmod> provides a command line user
interface for module creation. Supports reading default configuration settings
from a file and will create a default config file if requested. These config
files extend and/or override an C<ExtUtils::ModuleMaker::Personal::Defaults>
file. The program can create full distributions, single modules, single
methods, default configuration files or default template directories
=back
Notable changes from ExtUtils::ModuleMaker:
=over 4
=item *
Default templates are generally simpler, as users are expected to customize
their own
=item *
.t files for single .pm files created I<after> the original build are named
after their corresponding .pm file rather than being sequentially numbered.
=item *
In the command-line program, I<COMPACT> style is set by default
=back
=head1 USAGE
ExtUtils::ModuleMaker::TT is designed to be used with the I<ALT_BUILD>
parameter of ExtUtils::ModuleMaker. It replaces much of the functionality
of L<ExtUtils::ModuleMaker::StandardText>.
use ExtUtils::ModuleMaker;
my $mmtt = ExtUtils::ModuleMaker->new (
NAME => 'My::New::Module',
ALT_BUILD => 'ExtUtils::ModuleMaker::TT',
);
Generally, users should just use the included command-line program,
L<makeperlmod>. For example, the following command will create a module
distribution using default settings:
makeperlmod -n Sample::Module
See the L<makeperlmod> manual page for details on creating a custom configuration
file (for setting author details and other ExtUtils::ModuleMaker options) that
will extend or override defaults set in an
ExtUtils::ModuleMaker::Personal::Defaults file. The L<CUSTOMIZING TEMPLATES>
section below contains other examples.
When specified as the ALT_BUILD, ExtUtils::ModuleMaker::TT provides several
additional methods as described below. The L<makeperlmod> source provides a
practical example of such usage.
( run in 2.033 seconds using v1.01-cache-2.11-cpan-5a3173703d6 )