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

NAME

scriptdist - create a distribution for a perl script

SYNOPSIS

% scriptdist script.pl

DESCRIPTION

The scriptdist program takes a script file and builds, in the current working directory, a Perl script distribution around it. You can add other files to the distribution once it is in place.

This script is designed to be a stand-alone program. You do not need any other files to use it. However, you can create a directory named .scriptdist in your home directory, and scriptdist will look for local versions of template files there. Any files in ~/.scriptdist/t will show up as is in the script's t directory (until I code the parts to munge those files). The script assumes you have specified your home directory in the environment variable HOME.

The process

Check for release information

The first time the scriptdist is run, or any time the scriptdist cannot find the file .scriptdistrc, it prompts for CPAN and SourceForge developer information that it can add to the .releaserc file. (NOT YET IMPLEMENTED)

Create a directory named after the script

The distribution directory is named after the script name, with a <.d> attached. The suffix is there only to avoid a name conflict. You can rename it after the script is moved into the directory.

Look for template files

The program looks in .scriptdistrc for files to copy into the target script distribution directory. After that, it adds more files unless they already exist (i.e. the script found them in the template directory).

Add Changes

A bare bones Changes file

Create the Makefile.PL
Create the t directory
Add compile.t, pod.t, prereq.t
Create test_manifest
Copy the script into the directory
Run make manifest
prompt for CVS import

Prints a friendly message to remind you to add the new directory to your source control system.

Creating the Makefile.PL

A few things have to show up in the Makefile.PL---the name of the script and the prerequisites modules are the most important. Luckily, scriptdist can discover these things and fill them in automatically.

TO DO

* add support for Module::Build (command line s

* Create Meta.yaml file

* Automatically generate PREREQ_PM section (needs Module::Info, Module::CoreList)

* Munge files copied from ~/.scriptdist

* Copy modules into lib directory (to create module dist)

* Command line switches to turn things on and off

Maybe a good idea, maybe not

* Add a cover.t and pod coverage test?

* Interactive mode?

* automatically import into CVS?

SOURCE AVAILABILITY

This source is part of a SourceForge project which always has the latest sources in CVS, as well as all of the previous releases.

        https://sourceforge.net/projects/brian-d-foy/

If, for some reason, I disappear from the world, one of the other members of the project can shepherd this module appropriately.

AUTHOR

brian d foy, <bdfoy@cpan.org>

COPYRIGHT

Copyright 2004, brian d foy, All rights reserved.

You may use this program under the same terms as Perl itself.