{"id":19640331,"url":"https://github.com/kentnl/dist-zilla-plugin-prereqs-upgrade","last_synced_at":"2026-06-06T20:31:09.622Z","repository":{"id":25789572,"uuid":"29228092","full_name":"kentnl/Dist-Zilla-Plugin-Prereqs-Upgrade","owner":"kentnl","description":"Upgrade existing prerequisites in place","archived":false,"fork":false,"pushed_at":"2017-03-01T22:59:34.000Z","size":63,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-09T18:56:38.312Z","etag":null,"topics":["dist-zilla","perl"],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kentnl.png","metadata":{"files":{"readme":"README.mkdn","changelog":"Changes","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-14T05:00:57.000Z","updated_at":"2017-03-01T22:58:52.000Z","dependencies_parsed_at":"2022-09-08T02:20:54.651Z","dependency_job_id":null,"html_url":"https://github.com/kentnl/Dist-Zilla-Plugin-Prereqs-Upgrade","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kentnl%2FDist-Zilla-Plugin-Prereqs-Upgrade","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kentnl%2FDist-Zilla-Plugin-Prereqs-Upgrade/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kentnl%2FDist-Zilla-Plugin-Prereqs-Upgrade/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kentnl%2FDist-Zilla-Plugin-Prereqs-Upgrade/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kentnl","download_url":"https://codeload.github.com/kentnl/Dist-Zilla-Plugin-Prereqs-Upgrade/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240947648,"owners_count":19883030,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dist-zilla","perl"],"created_at":"2024-11-11T14:05:24.439Z","updated_at":"2026-06-06T20:31:09.589Z","avatar_url":"https://github.com/kentnl.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nDist::Zilla::Plugin::Prereqs::Upgrade - Upgrade existing prerequisites in place\n\n# VERSION\n\nversion 0.001002\n\n# DESCRIPTION\n\nThis allows you to automatically upgrade selected prerequisites\nto selected versions, if, and only if, they're already prerequisites.\n\nThis is intended to be used to compliment `[AutoPrereqs]` without adding dependencies.\n\n    [AutoPrereqs]\n\n    [Prereqs::Upgrade]\n    Moose = 2.0 ; Moose 2.0 is added as a minimum to runtime.recommends to 2.0 if a lower version is in runtime.requires\n\nThis is intended to be especially helpful in `PluginBundle`'s where one may habitually\nalways want a certain version of a certain dependency every time they use it, but don't want to be burdened\nwith remembering to encode that version of it.\n\n# USAGE\n\n## BASICS\n\nFor most cases, all you'll need to do is:\n\n    [Prereqs::Upgrade]\n    My::Module = Version Spec that is recommended\n\nAnd then everything in `PHASE.requires` will be copied to `PHASE.recommends`\nif it is determined that doing so will cause the dependency to be changed.\n\nFor instance, you may want to do:\n\n    [Prereqs::Upgrade]\n    Moose = 2.0\n    Moo   = 1.008001\n\nNote that this will not imply Moo unless Moo is **ALREADY** a requirement, and won't imply Moose unless Moose is **ALREADY**\na requirement.\n\nAnd this will transform:\n\n    { runtime: { requires: { Moose: 0 }}\n\nInto\n\n    { runtime: {\n           requires:   { Moose: 0 },\n           recommends: { Moose: 2.0 }\n    }}\n\n### `-target_relation`\n\nBy default, the target relationship type is `recommends`.\n\nHowever, this can be adjusted with the `-target_relation` attribute.\n\n    [Prereqs::Upgrade]\n    ; -target_relation = requires ; Not recommended and way more strict\n    -target_relation = suggests   ; Makes upgrades suggestions instead of recommendations\n    Moose = 2.0\n    Moo   = 1.008001\n\n### `-source_relation`\n\nBy default, this tool assumes you have a single relation type\nthat you wish to translate into a  [`target`](#target_relation),\nand thus the default `-source_relation` is `requires`.\n\n    [Prereqs::Upgrade]\n    ; This example doesn't make much sense but it would work\n    -source_relation = recommends\n    -target_relation = suggests\n    Moose = 2.0\n\nThis would add a `PHASE.suggests` upgrade to `2.0` if `Moose` was found in `PHASE.recommends`\n\n### `-applyto_phase`\n\nBy default, this tool applies upgrades from `-source_relation` to `-target_relation`\n`foreach` `-applyto_phase`, and this lists default contents is:\n\n    [Prereqs::Upgrade]\n    -applyto_phase = build\n    -applyto_phase = configure\n    -applyto_phase = test\n    -applyto_phase = runtime\n    -applyto_phase = develop\n\n## ADVANCED USAGE\n\n### `-applyto_map`\n\nAdvanced users can define arbitrary transform maps, which the [basic](#basic-usage) parameters\nare simplified syntax for.\n\nUnder the hood, you can define any source `PHASE.RELATION` and map it as an upgrade to any target `PHASE.RELATION`, even if it doesn't make much sense to do so.\n\nThis section is material that often seems like `YAGNI` but I find I end up needing it somewhere,\nbecause its not very straight forward to demonstrate a simple case where it would be useful.\n\nHowever, in this example: If a distribution uses Moose, then the distribution itself is permitted to have version = `0`\n\nBut a `runtime.recommends` of `2.0` is injected, and a `develop.requires` of `2.0` is injected.\n\n    [Prereqs::Upgrade]\n    -applyto_map = runtime.requires = runtime.recommends\n    -applyto_map = runtime.requires = develop.requires\n    Moose = 2.0\n\n# SEE ALSO\n\n- [`[Prereqs::MatchInstalled]`](https://metacpan.org/pod/Dist::Zilla::Plugin::Prereqs::MatchInstalled)\n\n    Upgrades stated dependencies to whatever you have installed, which is\n    significantly more flippant than having some auto-upgrading base versions.\n\n- [`[Prereqs::Recommend::MatchInstalled]`](https://metacpan.org/pod/Dist::Zilla::Plugin::Prereqs::Recommend::MatchInstalled)\n\n    Like the above, except supports `requires` → `recommends` translation ( and does that by default )\n\n- [`[Prereqs::MatchInstalled::All]`](https://metacpan.org/pod/Dist::Zilla::Plugin::Prereqs::MatchInstalled::All)\n\n    The most hateful way you can request `CPAN` to install all the latest things for your module.\n\n# AUTHOR\n\nKent Fredric \u003ckentnl@cpan.org\u003e\n\n# COPYRIGHT AND LICENSE\n\nThis software is copyright (c) 2017 by Kent Fredric \u003ckentfredric@gmail.com\u003e.\n\nThis is free software; you can redistribute it and/or modify it under\nthe same terms as the Perl 5 programming language system itself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkentnl%2Fdist-zilla-plugin-prereqs-upgrade","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkentnl%2Fdist-zilla-plugin-prereqs-upgrade","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkentnl%2Fdist-zilla-plugin-prereqs-upgrade/lists"}