The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

dist_cooker - create a Perl distribution skeleton from personal templates

SYNOPSIS

        # from the command line, to create a distribution for Module::Name
        % dist_cooker Module::Name
        Description> ...
        Repository> ...

DESCRIPTION

dist_cooker builds a Perl distribution skeleton from template files. You create the templates however you like.

By default, I assume my own favorite values, and haven't made these customizable yet.

Your distribution template directory is ~/.templates/dist_cooker
Your module template name is lib/Foo.pm

When cook processes the templates, it provides definitions for these template variables:

author_name => the name of the module author

The author name is the first true value of the DIST_COOKER_AUTHOR environment variable, the value of `git config user.name`, or a default value.

cooker_version => version of Distribution::Cooker
cwd => the current working directory of the new module
description => the module description

Taken from the prompt

dir => path to module file

Derived from the module name

dist => dist name (Foo-Bar)

Derived from the module name

email => author email

The author name is the first true value of the DIST_COOKER_EMAIL environment variable, the value of `git config user.email`, or a default value.

module => the package name (Foo::Bar)

Taken from the command-line arguments

module_path => module path under lib/ (Foo/Bar.pm)

Derived from the module name

repo_name => lowercase module with hyphens (foo-bar)

Taken from the prompt

template_path => the source of the template files

Taken from the configuration

year => the current year

Writing a subclass

To provide a different set of defaults, or more customizable behavior, create your own subclass of Distribution::Cooker. Specialize the parts that you need.

TO DO

Distribution::Cooker needs to provide a way for people to override the defaults without having to write a subclass.

SEE ALSO

Other modules, such as Module:Starter, do a similar job but don't give you as much flexibility with your templates.

SOURCE AVAILABILITY

This module is in Github:

        http://github.com/briandfoy/distribution-cooker/

AUTHOR

brian d foy, <briandfoy@pobox.com>

COPYRIGHT AND LICENSE

Copyright © 2008-2024, brian d foy <briandfoy@pobox.com>. All rights reserved.

You may redistribute this under the same terms as Perl itself.