make - tools for making makefiles with.
use constant MOD_REQS => [ { name => 'Pod::Usage', version => '1.12', }, { name => 'IPC::Run', package => 'IPC-Run', version => '0.44', }, { name => 'DBI::Wrap', package => 'DBI-Wrap', version => '1.00', optional => 1, }, ]; use constant EXEC_REQS => [ { name => 'blastpgp', version => '1.50', vopt => '--version', }, { name => 'mkprofile', }, { name => 'mp3id', version => '0.4', vopt => '--help', vexpect => 255, }, ]; use constant NAME => 'Module-Name'; use constant VERSION_FROM => catfile (qw( lib Module Name.pm )); use constant AUTHOR => 'Martyn J. Pearce fluffy@inpharmatica.co.uk'; use constant ABSTRACT => 'This module makes chocolate biscuits'; use make.pm
This package provides methods and initialization to build standard perl modules.
The plan is, you define the requirements, and let the module take care of the rest.
The requirements you must define are:
An arrayref of hashrefs. Each hashref represents a required Perl module, and has the following keys:
Mandatory Name of the module used. The presence of this module is checked, and an exception is raised if it does not exist.
Optional Name of the package in which the module is to be found. If not defined, the package is assumed to be present in core Perl.
Modules that have been in core Perl since 5.005 need not be listed; the "core perl" default is for modules such as Pod::Usage which have been added to the core since 5.005.
Pod::Usage
Optional If supplied, the version of the module is checked against this number, and an exception raised if the version found is lower than that requested.
Optional If true, then failure to locate the package (or a suitable version) is not an error, but will generate a warning message.
If supplied, then this message will be given to the user in case of failure.
Name of the executable used. The presence of this executable is checked, and an exception is raised if it does not exist (in the PATH).
Optional Name of the package in which the executable is to be found.
If supplied, the vopt key must also be supplied.
Optional This is used only if the version key is also used. This is the option that is passed to the executable to ask for its version number. It may be the empty string if no option is used (but must be defined if version is defined).
version
Optional This is used only if the version key is also used. This is the exit code to expect from the program when polling for its version number. Defaults to 0. This is the exit code (value of $? in the shell) to use, not the value of the wait call.
$?
wait
The module name. It must conform to the established standard; in particular, it must not contain colon characters. The usual process, when providing a single-package module (e.g., to provide MIME::Base64), is to replace the :: occurences with hyphens (hence, MIME-Base64).
MIME::Base64
::
MIME-Base64
The module from which to establish the version number. This module must have a line of the form $VERSION = '0.01';. Declarative prefixes (.e.g, our) are fine; our is the usual one, since $VERSION is almost always a package variable.
$VERSION = '0.01';
our
$VERSION
The name of the module author(s), along with an email address. This is normally the person primarily responsible for the upkeep of the module.
A single (concise!) sentence describing the rough purpose of the module. It is not expected to be mightily accurate, but is for quick browsing of modules.
Email the author.
Martyn J. Pearce fluffy@cpan.org
fluffy@cpan.org
Copyright (c) 2001, 2002 Martyn J. Pearce. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head1'
To install File::Info, copy and paste the appropriate command in to your terminal.
cpanm
cpanm File::Info
CPAN shell
perl -MCPAN -e shell install File::Info
For more information on module installation, please visit the detailed CPAN module installation guide.