++ed by:
Damian Conway

NAME

Module::Starter::PBP - Create a module as recommended in "Perl Best Practices"

VERSION

This document describes Module::Starter::PBP version 0.0.3

SYNOPSIS

    # In your  ~/.module-starter/config file...

    author:  <Your Name>
    email:   <your@email.addr>
    plugins: Module::Starter::PBP
    template_dir: </some/absolute/path/name>


    # Then on the command-line...

    > module-starter --module=Your::New::Module


    # Or, if you're lazy and happy to go with
    # the recommendations in "Perl Best Practices"...

    > perl -MModule::Starter::PBP=setup
  
  

DESCRIPTION

This module implements a simple approach to creating modules and their support files, based on the Module::Starter approach. Module::Starter needs to be installed before this module can be used.

When used as a Module::Starter plugin, this module allows you to specify a simple directory of templates which are filled in with module-specific information, and thereafter form the basis of your new module.

The default templates that this module initially provides are based on the recommendations in the book "Perl Best Practices".

INTERFACE

Thsi module simply acts as a plugin for Module::Starter. So it uses the same command-line interface as that module.

The template files it is to use are specified in your Module::Starter config file, by adding a template_dir configuration variable that gives the full path name of the directory in which you want to put the templates.

The easiest way to set up this config file, the associated directory, and the necessary template files is to type:

    > perl -MModule::Starter::PBP=setup

on the command line. You will then be asked for your name, email address, and the full path name of the directory where you want to keep the templates, after which they will be created and installed.

Then you can create a new module by typing:

    > module-starter --module=Your::New::Module

Template format

The templates are plain files named:

        Build.PL
        Makefile.PL
        README
        Changes
        Module.pm
        t/whatever_you_like.t

The Module.pm file is the template for the .pm file for your module. Any files in the t/ subdirectory become the templates for the testing files of your module. All the remaining files are templates for the ditribution files of the same names.

In those files, the following placeholders are replaced by the appropriate information specific to the file:

<AUTHOR>

The nominated author. Taken from the author setting in your Module::Starter config file.

<BUILD INSTRUCTIONS>

Makefile or Module::Build instructions. Computed automatically according to the builder setting in your Module::Starter config file.

<DATE>

The current date (as returned by localtime). Computed automagically

<DISTRO>

The name of the complete module distribution. Computed automatically from the name of the module.

<EMAIL>

Where to send feedback. Taken from the email setting in your Module::Starter config file.

<LICENSE>

The licence under which the module is released. Taken from the license setting in your Module::Starter config file.

<MAIN MODULE>

The name of the main module of the distribution.

<MAIN PM FILE>

The name of the .pm file for the main module.

<MODULE NAME>

The name of the current module being created within the distribution.

<RT NAME>

The name to use for bug reports to the RT system. That is:

    Please report any bugs or feature requests to
    bug-<RT NAME>@rt.cpan.org>
<YEAR>

The current year. Computed automatically

DIAGNOSTICS

Can't find directory that holds Module::Starter::PBP templates

You did not tell Module::Starter::PBP where your templates are stored. You need a 'template_dir' specification. Typically this would go in your ~/.module-starter/config file. Something like:

    template_dir: /users/you/.module-starter/Templates
Can't access Module::Starter::PBP template directory

You specified a 'template_dir', but the path didn't lead to a readable directory.

The template: %s isn't in the template directory (%s)

One of the required templates:

was missing from the template directory you specified.

The template: %s isn't readable in the template directory (%s)

One of the templates in the template directory you specified was not readable.

Unknown placeholder <%s> in %s

One of the templates in the template directory contained a replacement item that wasn't a known piece of information.

CONFIGURATION AND ENVIRONMENT

See the documentation for Module::Starter and module-starter.

DEPENDENCIES

Requires the Module::Starter module.

INCOMPATIBILITIES

None reported.

BUGS AND LIMITATIONS

No bugs have been reported.

Please report any bugs or feature requests to bug-module-starter-pbp@rt.cpan.org, or through the web interface at http://rt.cpan.org.

AUTHOR

Damian Conway <DCONWAY@cpan.org>

LICENCE AND COPYRIGHT

Copyright (c) 2005, Damian Conway <DCONWAY@cpan.org>. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

DISCLAIMER OF WARRANTY

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.




Hosting generously
sponsored by Bytemark