Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kentnl/dist-zilla-plugin-prereqs-soften

Downgrade listed dependencies to recommendations if present
https://github.com/kentnl/dist-zilla-plugin-prereqs-soften

dist-zilla perl

Last synced: 18 days ago
JSON representation

Downgrade listed dependencies to recommendations if present

Awesome Lists containing this project

README

        

# NAME

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

# VERSION

version 0.006004

# 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](#copy_to)

# 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]`](https://metacpan.org/pod/Dist::Zilla::Plugin::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]`](https://metacpan.org/pod/Dist::Zilla::Plugin::OptionalFeature) automatically adds
dependencies to `develop.requires`

# AUTHOR

Kent Fredric

# COPYRIGHT AND LICENSE

This software is copyright (c) 2017 by Kent Fredric .

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