Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kentnl/dist-zilla-role-bundledeps
Automatically add all plugins in a bundle as dependencies
https://github.com/kentnl/dist-zilla-role-bundledeps
dist-zilla perl
Last synced: 18 days ago
JSON representation
Automatically add all plugins in a bundle as dependencies
- Host: GitHub
- URL: https://github.com/kentnl/dist-zilla-role-bundledeps
- Owner: kentnl
- License: other
- Created: 2013-11-04T06:46:02.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2017-03-03T11:02:02.000Z (almost 8 years ago)
- Last Synced: 2024-11-11T14:05:22.715Z (3 months ago)
- Topics: dist-zilla, perl
- Language: Perl
- Size: 255 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.mkdn
- Changelog: Changes
- Contributing: CONTRIBUTING.pod
- License: LICENSE
Awesome Lists containing this project
README
# NAME
Dist::Zilla::Role::BundleDeps - Automatically add all plugins in a bundle as dependencies
# VERSION
version 0.002006
# SYNOPSIS
package blahblahblah;
use Moose;
...
with 'Dist::Zilla::Role::PluginBundle';
with 'Dist::Zilla::Role::BundleDeps';Dependencies appear now for all plugins returned.
# DESCRIPTION
This role attempts to solve the problem of communicating dependencies to META.\* from bundles
in a different way.My first attempt was [`[Prereqs::Plugins]`](https://metacpan.org/pod/Dist::Zilla::Plugins::Prereqs::Plugins), which added
all values that are seen in the `dist.ini` to dependencies.However, that was inherently limited, as the `:version` specifier
is lost before the plugins appear on `$zilla->plugins`This Role however, can see any declarations of `:version` your bundle advertises,
by standing between your `bundle_config` method and `Dist::Zilla`# METHODS
## `bundledeps_defaults`
This method provides the `HashRef` of defaults to use for the generated `Prereqs` section.
Because this role is intended to advertise Plugin Bundle dependencies, and because those
dependencies will be "develop" dependencies everywhere other than the bundle itself,
our defaults are:{
-phase => develop,
-relationship => requires,
}These can be overridden when consuming a bundle in `dist.ini`
[@Author::MyBundle]
; authordep Dist::Zilla::Role::BundleDeps
bundledeps_phase = runtime
bundledeps_relationship = requires# LIMITATIONS
## Self References in develop\_requires
If you bundle plugins with your bundle, and use those plugins in the bundle,
you'll risk a self-reference problem, which may be solved in a future release of Dist::Zilla.Until then, you'll need to possibly use [`[RemovePrereqs]`](https://metacpan.org/pod/Dist::Zilla::Plugin::RemovePrereqs)
to trim self-references.## Bootstrap problems on Bundles
When using your bundle to ship itself, the use of this role can imply some confusion if the role is not installed,
as `dzil listdeps` will require this role present to work.It is subsequently recommended to state an explicit `AuthorDep` in `dist.ini` to avoid this.
[Bootstrap::lib]
[@Author::MyBundle]
; authordep Dist::Zilla::Role::BundleDeps
bundledeps_phase = runtime
bundledeps_relationship = requires# SEE ALSO
[`[BundleInspector]`](https://metacpan.org/pod/Dist::Zilla::Plugin::BundleInspector)
# 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.