{"id":19640324,"url":"https://github.com/kentnl/dist-zilla-role-bootstrap","last_synced_at":"2026-06-18T09:31:47.680Z","repository":{"id":10426953,"uuid":"12588829","full_name":"kentnl/Dist-Zilla-Role-Bootstrap","owner":"kentnl","description":"Shared logic for bootstrap things","archived":false,"fork":false,"pushed_at":"2017-11-05T22:37:05.000Z","size":339,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-09T18:56:32.418Z","etag":null,"topics":["dist-zilla","perl"],"latest_commit_sha":null,"homepage":"","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":"CONTRIBUTING.pod","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-09-04T11:06:29.000Z","updated_at":"2017-02-28T02:26:46.000Z","dependencies_parsed_at":"2022-09-02T03:51:10.321Z","dependency_job_id":null,"html_url":"https://github.com/kentnl/Dist-Zilla-Role-Bootstrap","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kentnl%2FDist-Zilla-Role-Bootstrap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kentnl%2FDist-Zilla-Role-Bootstrap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kentnl%2FDist-Zilla-Role-Bootstrap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kentnl%2FDist-Zilla-Role-Bootstrap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kentnl","download_url":"https://codeload.github.com/kentnl/Dist-Zilla-Role-Bootstrap/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:22.426Z","updated_at":"2026-06-18T09:31:47.633Z","avatar_url":"https://github.com/kentnl.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nDist::Zilla::Role::Bootstrap - Shared logic for bootstrap things.\n\n# VERSION\n\nversion 1.001005\n\n# SYNOPSIS\n\nFor consuming plugins:\n\n    use Moose;\n    with 'Dist::Zilla::Role::Bootstrap';\n\n    sub bootstrap {\n        my $bootstrap_root = $_[0]-\u003e_bootstrap_root;\n        # Do the actual bootstrap work here\n        $_[0]-\u003e_add_inc('./some/path/here');\n    }\n\nFor users of plugins:\n\n    [Some::Plugin::Name]\n    try_built = 0 ; # use / as the root to bootstrap\n    try_built = 1 ; # try to use /Dist-Name-.*/ instead of /\n\n    fallback  = 0 ; # don't bootstrap at all if /Dist-Name-.*/ matches != 1 things\n    fallback  = 1 ; # fallback to / if /Dist-Name-.*/ matches != 1 things\n\n# DESCRIPTION\n\nThis module is a role that aims to be consumed by plugins that want to perform\nsome very early bootstrap operation that may affect the loading environment of\nsuccessive plugins, especially with regards to plugins that may wish to build with\nthemselves, either by consuming the source tree itself, or by consuming a previous\nbuilt iteration.\n\nImplementation is quite simple:\n\n- 1. `with` this role in your plugin\n\n        with 'Dist::Zilla::Role::Bootstrap'\n\n- 2. Implement the `bootstrap` sub.\n\n        sub bootstrap {\n          my ( $self ) = @_;\n        }\n\n- 3. _Optional_: Fetch the discovered `bootstap` root via:\n\n        $self-\u003e_bootstap_root\n\n- 4. _Optional_: Load some path into `@INC` via:\n\n        $self-\u003e_add_inc($path)\n\n# REQUIRED METHODS\n\n## `bootstrap`\n\nAny user specified `bootstrap` method will be invoked during `plugin_from_config`.\n\nThis is **AFTER** `-\u003enew`, **AFTER** `-\u003eBUILD`, and **AFTER** `dzil`'s internal `plugin_from_config` steps.\n\nThis occurs within the `register_component` phase of the plug-in loading and configuration.\n\nThis also occurs **BEFORE** `Dist::Zilla` attaches the plug-in into the plug-in stash.\n\n# ATTRIBUTES\n\n## `distname`\n\nThe name of the distribution.\n\nThis value is vivified by asking `zilla-\u003ename`.\n\nUsually this value is populated by `dist.ini` in the property `name`\n\nHowever, occasionally, this value is discovered by a `plugin`.\n\nIn such a case, that plugin cannot be bootstrapped, because that plugin **MUST** be loaded prior to bootstrap.\n\n## `try_built`\n\nThis attribute controls how the consuming `plugin` behaves.\n\n- false **(default)** : bootstrapping is only done to `PROJECTROOT/lib`\n- true : bootstrap attempts to try `PROJECTROOT/\u003cdistname\u003e-\u003cversion\u003e/lib`\n\n## `fallback`\n\nThis attribute is for use in conjunction with `try_built`\n\n- `false` : When `PROJECTROOT/\u003cdistname\u003e-\u003cversion\u003e` does not exist, don't perform any bootstrapping\n- `true` **(default)** : When `PROJECTROOT/\u003cdistname\u003e-\u003cversion\u003e` does not exist, bootstrap to `PROJECTROOT/lib`\n\n## `try_built_method`\n\nThis attribute controls how `try_built` behaves when multiple directories exist that match `PROJECTROOT/\u003cdistname\u003e-.*`\n\nTwo valid options at this time:\n\n- `mtime` **(default)** : Pick the directory with the most recent `mtime`\n- `parseversion` : Attempt to parse versions on all candidate directories and use the one with the largest version.\n\nPrior to `0.2.0` this property did not exist, and default behavior was to assume `0 Candidates` and `2 or more Candidates` were the same problem.\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-role-bootstrap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkentnl%2Fdist-zilla-role-bootstrap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkentnl%2Fdist-zilla-role-bootstrap/lists"}