NAME

Dist::Zilla::Plugin::Prereqs::Soften - Downgrade listed dependencies to recommendations if present.

VERSION

version 0.006003

SYNOPSIS

[Prereqs::Soften]
module = Foo
module = Bar

DESCRIPTION

This module iterates build, require and test dependency lists and migrates dependencies found in .requires and demotes them to .recommends

Optionally, it can duplicate softened dependencies to other locations

ATTRIBUTES

modules

A multi-value argument that specifies a module name to soften in prereqs.

to_relationship

The output relationship kind.

Default:

'recommends'

Valid Values:

'recommends', 'suggests', 'none', 'requires', 'conflicts'

Though the last two are reserved for people with $num_feet > 2 or with shotguns that only fire blanks.

none is available since 0.006000 to allow removal of dependencies in conjunction with copying them.

copy_to

Additional places to copy the dependency to:

Default:

[]

Example:

[Prereqs::Soften]
copy_to         = develop.requires
to_relationship = recommends
module          = Foo

This in effect means:

remove from: runtime.requires
    → add to: develop.requires
    → add to: runtime.recommends

remove from: test.requires
    → add to: develop.requires
    → add to: test.recommends

 remove from: build.requires
    → add to: develop.requires
    → add to: build.recommends

modules_from_features

This is for use in conjunction with [OptionalFeature], or anything that injects compatible structures into distmeta.

Recommended usage as follows:

[OptionalFeature / Etc]
...

[Prereqs::Soften]
modules_from_features = 1

In this example, copy_to and modules are both redundant, as modules are propagated from all features, and copy_to is not necessary because [OptionalFeature] automatically adds dependencies to develop.requires

AUTHOR

Kent Fredric <kentnl@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2017 by Kent Fredric <kentfredric@gmail.com>.

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