{"id":18779372,"url":"https://github.com/zostay/raku-compunit-dynamiclib","last_synced_at":"2025-12-18T00:30:17.308Z","repository":{"id":66558030,"uuid":"71006229","full_name":"zostay/raku-CompUnit-DynamicLib","owner":"zostay","description":"Load modules from temporarily included locations","archived":false,"fork":false,"pushed_at":"2020-02-08T16:24:35.000Z","size":8,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-29T10:29:10.211Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Raku","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zostay.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-15T18:34:52.000Z","updated_at":"2021-05-14T15:58:01.000Z","dependencies_parsed_at":"2023-04-06T08:06:12.192Z","dependency_job_id":null,"html_url":"https://github.com/zostay/raku-CompUnit-DynamicLib","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zostay%2Fraku-CompUnit-DynamicLib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zostay%2Fraku-CompUnit-DynamicLib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zostay%2Fraku-CompUnit-DynamicLib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zostay%2Fraku-CompUnit-DynamicLib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zostay","download_url":"https://codeload.github.com/zostay/raku-CompUnit-DynamicLib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239690589,"owners_count":19681128,"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":[],"created_at":"2024-11-07T20:19:53.099Z","updated_at":"2025-12-18T00:30:17.278Z","avatar_url":"https://github.com/zostay.png","language":"Raku","funding_links":[],"categories":[],"sub_categories":[],"readme":"NAME\n====\n\nCompUnit::DynamicLoader - load modules from temporarily included locations\n\nSYNOPSIS\n========\n\n    use CompUnit::DynamicLib;\n\n    my @includes = \u003cplugin/lib module/lib other/lib\u003e;\n\n    require-from(@includes, \"MyPlugin::Module\");\n\n    use-lib-do @includes, {\n        require ModuleX;\n        require ModuleY \u003c\u0026something\u003e;\n    }\n\nDESCRIPTION\n===========\n\n**Experimental:** I do not really know if what this module does is a good idea or the best way to do it, but I am trying it out. Please use with caution and let me know if you have any problems.\n\nWhen searching for compilation units (more commonly referred to as just \"modules\" or \"packages\" or \"classes\") in Perl 6, the VM hunts through all the [CompUnit::Repository](CompUnit::Repository) objects chained in `$*REPO` (this is a more flexible solution to the `@INC` setting using in Perl 5).\n\nNormally, to add a new repository to the list, you would just run:\n\n    use lib \"my-other-lib\";\n    # load your modules here\n\nHowever, perhaps you don't wnat to normally load from a location in your program. You might want to load from a location just long enough to get files out of it and then never see it again. This is a common scenario if your application allows for the use of custom plugin code.\n\nThis library makes it possible to add a directory to the list of repositories, load the modules you want, and then remove them so that no more code will be loaded from there:\n\n    use-lib-do \"my-other-lib\", {\n        # load your modules here\n    }\n\nEXPORTED ROUTINES\n=================\n\nsub use-lib-do\n--------------\n\n    multi sub use-lib-do(@include, \u0026block)\n    multi sub use-lib-do($include, \u0026block)\n\nGiven a set of repository specs to `@include` (or `$include`) and a `\u0026block` to run, add those repositories (usually directory names) to `$*REPO`, run the `\u0026block`, and then strip the temporary repositories back out again.\n\nsub require-from\n----------------\n\n    multi sub require-from(@include, $module-name)\n    multi sub require-from($include, $module-name)\n\nIn cases where you only need to load a single module, this can be used as a shortcut for:\n\n    use-lib-do @include, { require ::($module-name) };\n\nAUTHOR \u0026 COPYRIGHT\n==================\n\nCopyright 2016 Sterling Hanenkamp.\n\nThis software is made available under the same terms as Perl 6 itself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzostay%2Fraku-compunit-dynamiclib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzostay%2Fraku-compunit-dynamiclib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzostay%2Fraku-compunit-dynamiclib/lists"}