Dist::Zilla::Plugin::Bootstrap::ShareDir::Module - Use a share directory on your dist for a module during bootstrap
version 1.001002
This module allows one to load a Module styled ShareDir using a Bootstrap mechanism so a distribution can use files in its own source tree when building with itself.
Module
ShareDir
Bootstrap
This is very much like the Bootstrap::lib plugin in that it injects libraries into @INC based on your existing source tree, or a previous build you ran.
Bootstrap::lib
@INC
And it is syntactically like the ModuleShareDirs plugin.
ModuleShareDirs
Note that this is really only useful for self consuming plugins and will have no effect on the test or run phases of your dist. ( For that, you'll need Test::File::ShareDir ).
test
run
Test::File::ShareDir
[Bootstrap::lib] [Bootstrap::ShareDir::Module] Foo::Bar = shares/foo_bar Foo::Baz = shares/foo_baz [ModuleShareDirs] Foo::Bar = shares/foo_bar Foo::Baz = shares/foo_baz
The only significant difference between this module and ModuleShareDirs is this module exists to make a share visible to plugins for the distribution being built, while ModuleShareDirs exists to export a share directory visible after install time.
share
Additionally, there are two primary attributes that are provided by Dist::Zilla::Role::Bootstrap, See "ATTRIBUTES" in Dist::Zilla::Role::Bootstrap
Dist::Zilla::Role::Bootstrap
For instance, this bootstraps ROOT/Your-Dist-Name-$VERSION/shares/foo_bar if it exists and there's only one $VERSION, otherwise it falls back to simply bootstrapping ROOT/shares/foo_bar
ROOT/Your-Dist-Name-$VERSION/shares/foo_bar
$VERSION
ROOT/shares/foo_bar
[Bootstrap::ShareDir::Module] Foo::Bar = shares/foo_bar Foo::Baz = shares/foo_baz ; These are special cased dir = share try_built = 1
Kent Fredric <kentnl@cpan.org>
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.
To install Dist::Zilla::Plugin::Bootstrap::ShareDir::Module, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dist::Zilla::Plugin::Bootstrap::ShareDir::Module
CPAN shell
perl -MCPAN -e shell install Dist::Zilla::Plugin::Bootstrap::ShareDir::Module
For more information on module installation, please visit the detailed CPAN module installation guide.