App-Tel
view release on metacpan or search on metacpan
local/lib/perl5/Module/Install/API.pod view on Meta::CPAN
B<version> command takes a version string for the distribution.
B<version_from> takes a module file path, and looks for the
C<$VERSION> of the module.
The value set by B<version> or B<version_from> is passed to
L<ExtUtils::MakeMaker> as a C<VERSION> attribute. B<version_from>
(and B<all_from>) also sets a C<VERSION_FROM> attribute to check
version integrity of the distribution.
=head2 perl_version, perl_version_from (L<Module::Install::Metadata>)
perl_version '5.008';
perl_version_from 'lib/Foo/Bar.pm';
B<perl_version> command takes a minimum required perl version for the
distribution. B<perl_version_from> takes a module file path, and
looks for a C<< use <perl_version> >> (or C<< require <perl_version>
>>) statement (note that now L<Module::Install> only supports perl
5.005 and newer).
The value set by B<perl_version> or B<perl_version_from> is passed to
L<ExtUtils::MakeMaker> as a C<MIN_PERL_VERSION> attribute (if
applicable).
=head2 author, author_from (L<Module::Install::Metadata>)
author 'John Doe <john.doe at cpan.org>';
author_from 'lib/Foo/Bar.pm';
B<author> command takes a string to describe author(s). You can set
multiple authors with one B<author> command, or with multiple
B<author>s (you can also use B<authors> alias if you prefer).
B<author_from> takes a module file path, and looks for an C<AUTHOR>
(or C<AUTHORS>) section in the pod (and also license/copyright
sections if it can't find any author(s) section) to extract an
author.
The value set by B<author> or B<author_from> is concatenated and
passed to L<ExtUtils::MakeMaker> as an C<AUTHOR> attribute.
=head2 license, license_from (L<Module::Install::Metadata>)
license 'perl';
license_from 'lib/Foo/Bar.pm';
B<license> command takes an abbreviated license name including
C<perl>, C<artistic>, C<apache>, C<(l)gpl>, C<bsd>, C<mit>,
C<mozilla>, C<open_source>, and so on. If you don't (want to) specify
a particular license, it will be C<unknown>.
B<license_from> takes a module file path, and looks for a C<LICENSE>
(or C<LICENCE>) section in the pod (and also C<COPYRIGHT> section if
it can't find any) to extract a license.
The value set by B<license> or B<license_from> is passed to
L<ExtUtils::MakeMaker> as an C<LICENSE> attribute (if applicable).
You are also reminded that if the distribution is intended to be
uploaded to the CPAN, it B<must> be an OSI-approved open source
license. Commercial software is not permitted on the CPAN.
=head1 COMMANDS TO PROVIDE DEPENDENCIES
Most of these are described in the main pod, too.
=head2 requires (L<Module::Install::Metadata>)
requires 'Foo::Bar';
requires 'Foo::Baz' => '1.00';
B<requires> command takes a module name on which your distribution
depends, and its minimum required version if any. You may add
arbitrary numbers of C<requires>. You even can add multiple numbers
of dependencies on the same module with different required versions
(which will be sorted out later, though). Note that this dependency
is on the basis of a module, not of a distribution. This usually
doesn't matter, and you just need to call for a module you really
need (then you'll get the whole distribution it belongs to), but
sometimes you may need to call for all the modules that the required
module implicitly requires.
The values set by B<requires> are passed to L<ExtUtils::MakeMaker> as
a C<PREREQ_PM> attribute.
=head2 build_requires, test_requires (L<Module::Install::Metadata>)
build_requires 'ExtUtils::Foo::Bar';
build_requires 'ExtUtils::Foo::Baz' => '1.00';
test_requires 'Test::Foo::Bar';
test_requires 'Test::Foo::Baz' => '1.00';
B<build_requires> command also takes a module name and a minimum
required version if any. The difference from the C<requires> command
is that B<build_requires> is to call for modules you'll require while
building the distribution, or in the tests, and that in theory are
not required at run-time. This distinction is more for other system
package managers than for the CPAN, from where you usually want to
install everything for future reuse (unless you are too lazy to test
distributions).
As of this writing, C<test_requires> is just an alias for
C<build_requires>, but this may change in the future.
The values set by B<build_requires> and B<test_requires> are passed
to L<ExtUtils::MakeMaker> as a C<BUILD_REQUIRES> attribute, which may
fall back to C<PREREQ_PM> if your L<ExtUtils::MakeMaker> is not new
enough.
=begin experimental
=head2 install_requires (L<Module::Install::Metadata>)
install_requires 'Test::Foo::Bar';
install_requires 'Test::Foo::Baz' => '1.00';
B<install_requires> is yet another alias for C<build_requires>. This
is not used yet.
=end experimental
( run in 1.499 second using v1.01-cache-2.11-cpan-b16cb0d3907 )