{"id":19640363,"url":"https://github.com/kentnl/dist-zilla-plugin-bootstrap-lib","last_synced_at":"2026-06-10T04:31:17.504Z","repository":{"id":1015673,"uuid":"841708","full_name":"kentnl/Dist-Zilla-Plugin-Bootstrap-lib","owner":"kentnl","description":"A minimal boot-strapping for Dist::Zilla Plug-ins","archived":false,"fork":false,"pushed_at":"2017-03-18T04:58:11.000Z","size":490,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-09T18:57:05.318Z","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":"2010-08-16T18:23:20.000Z","updated_at":"2017-03-01T21:14:22.000Z","dependencies_parsed_at":"2022-08-16T11:50:16.248Z","dependency_job_id":null,"html_url":"https://github.com/kentnl/Dist-Zilla-Plugin-Bootstrap-lib","commit_stats":null,"previous_names":[],"tags_count":42,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kentnl%2FDist-Zilla-Plugin-Bootstrap-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kentnl%2FDist-Zilla-Plugin-Bootstrap-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kentnl%2FDist-Zilla-Plugin-Bootstrap-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kentnl%2FDist-Zilla-Plugin-Bootstrap-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kentnl","download_url":"https://codeload.github.com/kentnl/Dist-Zilla-Plugin-Bootstrap-lib/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:33.611Z","updated_at":"2026-06-10T04:31:17.473Z","avatar_url":"https://github.com/kentnl.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nDist::Zilla::Plugin::Bootstrap::lib - A minimal boot-strapping for Dist::Zilla Plug-ins.\n\n# VERSION\n\nversion 1.001002\n\n# SYNOPSIS\n\n    [Bootstrap::lib]\n    try_built   = 1  ; try using an existing built distribution named Dist-Name-*\n    fallback    = 0  ; if try_built can't find a built distribution, or there's more than one, don't bootstrap\n                     ; using lib/ instead\n\n# DESCRIPTION\n\nThis module exists for loading either `/lib` or `/Dist-Name-$VERSION/lib` into your `@INC` early on.\n\nThis is mostly useful for writing [`Dist::Zilla`](https://metacpan.org/pod/Dist::Zilla) plug-ins, so that you may build and release\na plug-in using itself.\n\n# USE CASES\n\n## Simple single-phase self-dependency\n\nThis module really is only useful in the case where you need to use something like\n\n    dzil -Ilib\n\nFor _every_ call to [`Dist::Zilla`](https://metacpan.org/pod/Dist::Zilla), and this is mainly a convenience.\n\nFor that\n\n    [Bootstrap::lib]\n\non its own will do the right thing.\n\n## Installed-Only self-dependency\n\nThe other useful case is when you would normally do\n\n    dzil build                 # pass 1 that generates Foo-1.234 with a pre-installed Foo-1.233\n    dzil -IFoo-1.234/lib build # pass 2 that generates Foo-1.234 with Foo-1.234\n\nFor that\n\n    [Bootstap::lib]\n    try_built   = 1\n    fallback    = 0\n\nWill do what you want.\n\n    dzil build   # pass1 -\u003e creates Foo-1.234 without bootstrapping\n    dzil build   # pass2 -\u003e creates Foo-1.234 boot-strapped from the previous build\n\n## 2-step self-dependency\n\nThere's a 3rd useful case which is a hybrid of the 2, where you /can/ build from your own sources without needing a\npre-installed version, just you don't want that for release code ( e.g.: $VERSION being `undef` in code that is run during\nrelease is \"bad\" )\n\n    [Bootstrap::lib]\n    try_built = 1\n    fallback  = 1\n\nThen\n\n    dzil build  # pass1 -\u003e creates Foo-1.234 from bootstrapped $root/lib\n    dzil build  # pass2 -\u003e creates Foo-1.234 from bootstrapped $root/Foo-1.234\n\n# PRECAUTIONS\n\n## DO NOT\n\n**DO NOT** use this library from inside a bundle. It will not likely work as expected, and you **DO NOT** want\nto bootstrap everything in all cases.\n\n## NO VERSION\n\nOn its own,\n\n    [Bootstrap::lib]\n\nAt present, using this module in conjunction with a module with no explicitly defined version in the\nsource will result in the _executed_ instance of that plug-in _also_ having **NO VERSION**.\n\nIf this is a problem for you, then its suggested you try either variation of using\n\n    [Bootstrap::lib]\n    try_built = 1\n    ; no_fallback = 1   #\n\n## SUCKS AT GUESSING\n\nThe core mechanism behind `try_built` relies on looking in your project directory for a previous build directory of some kind.\n\nAnd there's no way for it to presently pick a \"best\" version when there are more than one, or magically provide a better\nsolution if there are \"zero\" versions readily available.\n\nThis is mostly because there is no way to determine the \"current\" version we are building for, because the point in the\nexecution cycle is so early, no version plugins are likely to be even instantiated yet, and some version plugins are dependent on\nincredibly complex precursors ( like git ), so by even trying to garner the version we're currently building, we could be\nprematurely cutting off a vast majority of modules from even being able to bootstrap.\n\nEven as it is, us using `zilla-\u003ename` means that if your dist relies on some process to divine its name, the module that\ndoes this must:\n\n- be loaded and declared prior to `Bootstrap::lib` in the `dist.ini`\n- not itself be the module you are presently developing/bootstrapping\n\nThe only way of working around that I can envision is adding parameters to `Bootstrap::lib` to specify the dist name and version\nname... but if you're going to do that, you may as well stop using external plugins to discover that, and hard-code those values\nin `dist.ini` to start with.\n\n## STILL NOT REALLY A PLUGIN\n\nStarting at version 0.04000000 ( read: 0.04\\_0000\\_00 aka 0.04 + 0 x 4 + 0 x 2 ) this module is a fully fledged class, different\nonly from standard Dist::Zilla Plugins in that it doesn't partake in normal phase order, and only executes during a special\ncustom `::Bootstrap` phase, which is more or less a different name and implementation of `BUILD`, in that `bootstrap` is\ninvoked after `plugin_from_config` is called ( where `new` is called ), which occurs somewhere in the middle of\n`register_component`\n\nThis module also appears on the plugin stash, and responds naturally to `metaconfig` requests.\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 \u003ckentnl@cpan.org\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-bootstrap-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkentnl%2Fdist-zilla-plugin-bootstrap-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkentnl%2Fdist-zilla-plugin-bootstrap-lib/lists"}