GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  MODULE::INSTALL::AUTHORREQUIRES (3)

.ds Aq ’

NAME

Module::Install::AuthorRequires - declare author-only dependencies

CONTENTS

SYNOPSIS



    author_requires Some::Module;
    author_requires Another::Module => 0.42;



DESCRIPTION

Modules often have optional requirements, for example dependencies that are useful for (optional) tests, but not required for the module to work properly.

Usually you want all developers of a project to have these optional modules installed. However, simply telling everyone or printing diagnostic messages if optional dependencies are missing often isn’t enough to make sure all authors have all optional modules installed.

Module::Install already has a way of detecting an author environment, so an easy way to achieve the above would be something like:



    if ($Module::Install::AUTHOR) {
        requires Some::Module;
        requires Another::Module => 0.42;
    }



Unfortunately, that’ll also make the optional dependencies show up in the distributions META.yml file, which is obviously wrong, as they aren’t actually hard requirements.

Working that around requires a considerable amount of non-trivial Makefile.PL hackery, or simply using this module’s author_requires command.

COMMANDS

    author_requires



    author_requires $module;
    author_requires $module => $version;



This declares a hard dependency, that’s only enforced in author environments and is not put in the generate META.yml file of the distribution.

AUTHOR

Florian Ragwitz <rafl@debian.org>

COPYRIGHT AND LICENSE

Copyright (c) 2009 Florian Ragwitz

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

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 MODULE::INSTALL::AUTHORREQUIRES (3) 2009-07-14

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.