NAME

oodist - create perl distributions with OODoc

SYNOPSIS

cd <src>
oodist [OPTIONS]
  OPTION:                 DEFAULT:
  --pod  or --nopod         produce pod: yes
  --dist or --nodist        produce distribution: yes
  --html or --nohtml        produce html: yes if templates
  --raw  or --noraw         produce package with raw files: yes

 OPTIONS general:
  --distdir  | -d <dir>     makefile:DISTDIR || $ENV{OODOC_DISTDIR} || <src>
  --extends  | -x <path>    empty
  --project  | -p <string>  makefile:DISTNAME
  --rawdir   | -r <dir>     makefile:RAWDIR  || $ENV{OODOC_RAWDIR} || <src>
  --readme        <file>    constructured
  --workdir  | -w <dir>     /tmp/<DISTVNAME>
  --verbose  | -v           true when specified

 OPTIONS for POD:
  --email    | -e <email>   makefile:EMAIL
  --firstyear| -y <year>    makefile:FIRST_YEAR
  --license  | -l <string>  makefile:LICENSE || $ENV{OODOC_LICENSE} || 'artistic'
  --pmhead   | -h <file>    'PMHEAD.txt'     || constructed
  --podtail  | -t <file>    'PODTAIL.txt'    || constructed
  --website  | -u <url>     makefile:WEBSITE

 OPTIONS for HTML:
  --html-templates <dir>    makefile:HTML_TEMPLATES || 'html'
  --html-output <dir>       makefile:HTML_OUTPUT    || 'public_html'
  --html-docroot <url>      makefile:HTML_DOCROOT   || '/'
  --html-package <dir>      makefile:HTML_PACKAGE

DESCRIPTION

The oodist script is currently only usable on UNIX in combination with Makefile.PL. It is a smart wrapper around the OODoc module, to avoid start work to produce real POD for modules which use OODoc's POD extensions. HTML is not (yet) supported.

Configuring

All OPTIONS can be specified on the command-line, but you do not want to specify them explicitly each time you produce a new distribution for your product. The options come in two kinds: those which are environment independent and those which are. The first group can be set via the Makefile.PL, the second can be set using environment variables as well.

Example: add to the end of your Makefile.PL

sub MY::postamble { <<'__POSTAMBLE' }
FIRST_YEAR   = 2001
WEBSITE      = http://perl.overmeer.net/oodoc
EMAIL        = oodoc@overmeer.net
__POSTAMBLE

Main options

The process is controlled by four main options. All options are by default on.

. --pod or --nopod

Produce pod files in the working directory and in the distribution.

. --dist or --nodist

Create a distribution, containing all files from the MANIFEST plus produced files.

. --html or --nohtml

Create html manual pages. The --html-templates options must point to an existing directory (defaults to the html/ sub-directory).

. --raw or --noraw

Create a package which contains the files which are needed to produce the distribution: the pm files still including the oodoc markup.

General options

The other OPTIONS in detail

. --readme <filename>

Copy the specified README file into the distribution, if there is no README yet. The name will be added to the MANIFEST. If the option is not specified, a simple file will be created. If this option is specified, but the filename is empty, then the README will not be produced.

. --distdir | -d <dir>

The location where the final file to be distributed is placed, by default in the source directory. Ignored when --test is used.

. --extends | -x <path>

A colon seperated list of directories which contains "raw oodoc" pm and pod files which are (in some cases) used to provide data for base-classes of this module.

. --rawdir | --r <dir>

The location where a raw version of the distribution is made. The normal distribution contains expanded POD and stripped PM files. For that reason, you can not use it a backup for your files. If you have co-workers on the module, you may wish to give them the originals. gnored when --test is used.

. --test | -t

Run in test mode: the raw and real distributions are produced, but not moved to their final location. You will end-up with these archives in the work-directory (see --workdir).

. --verbose | --v

Shows what happens during the process.

. --workdir | -w <dir>

The processing will take place in a seperate directory: the stripped pm's and produced pod files will end-up there.

If not provided, that directory will be named after the project, and located in $ENV{TMPDIR}, which defaults to /tmp. For instance /tmp/OODoc/

Options to produce POD

. --email | -e <email>

The email address which can be used to contact the authors. Used in the automatic podtail.

. --firstyear| -y <string>

The first year that a release for this software was made. Used in the automatic podtail. The specified string can be more complex than a simple year, for instance 1998-2000,2003. The last year will be automatically added like -2006, which results in 1998-2000,2003-2006. When the current year is detected at the end of the string, the year will not be added again.

. --license | -l ['gpl'|'artistic'|filename]

The lisense option is a special case: it can contain either the strings gpl or artistic, or a filename which is used to read the actual license text from. The default is artistic

. --pmhead

Each of the stripped pm files will have content of the file added at the top. Each line will get a comment '# ' marker before it. If not specified, a short notice will be produced automatically. Implicitly, if a file PMHEAD.txt exists, that will be used.

. --podtail

Normally, a trailing text is automatically produced, based on all kinds of facts. However, you can specify your own file. If exists, the content is read from a file named PODTAIL.txt, and no construction is attempted.

. --website | -u <url>

Where the HTML documentation related to this module is publicly visible.

Options to produce HTML

. --html-docroot <url>

This (usually relative) URL is prepended to all absolute links in the HTML output.

. --html-output <dir>

The directory where the produced HTML pages are written to.

. --html-templates <dir>

The directory which contains the templates for HTML pages which are used to construct the html version of the manual-pages.

. --html-package <dir>

When specified, the html-output directory will get packaged into a a tar achive in this specified directory.