{"id":19840066,"url":"https://github.com/kwakwaversal/rex-plenv-base","last_synced_at":"2026-06-09T06:05:45.604Z","repository":{"id":71116609,"uuid":"44565446","full_name":"kwakwaversal/rex-plenv-base","owner":"kwakwaversal","description":"Rex module to install plenv","archived":false,"fork":false,"pushed_at":"2016-10-19T15:14:13.000Z","size":13,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-11T11:28:11.849Z","etag":null,"topics":["perl","plenv","rexfile"],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kwakwaversal.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-10-19T21:33:57.000Z","updated_at":"2023-02-14T11:09:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"9c7d9f38-6ea9-411e-ba23-71d488a5cf86","html_url":"https://github.com/kwakwaversal/rex-plenv-base","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/kwakwaversal%2Frex-plenv-base","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kwakwaversal%2Frex-plenv-base/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kwakwaversal%2Frex-plenv-base/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kwakwaversal%2Frex-plenv-base/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kwakwaversal","download_url":"https://codeload.github.com/kwakwaversal/rex-plenv-base/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241209729,"owners_count":19927737,"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":["perl","plenv","rexfile"],"created_at":"2024-11-12T12:25:26.722Z","updated_at":"2026-06-09T06:05:45.572Z","avatar_url":"https://github.com/kwakwaversal.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rex::Plenv::Base\n\nA Rex module to install [plenv](https://github.com/tokuhirom/plenv) (perl binary\nmanager) which automatically runs `plenv install-cpanm` after setup is complete.\n\nYou probably don't want to install plenv as the root user, so the tasks which\nrequire root permission, and those that do not, have been split into the\n`Rex::Plenv::Base::prepare()` and the `Rex::Plenv::Base::setup()` functions\nrespectively.\n\n*N.B., This doesn't prevent you from installing as root, it just makes it easier\nwhen you are not.*\n\n# USAGE\n\n## Rexfile\n\n```perl\ninclude qw/Rex::Plenv::Base/;\n\n# prepare holds root-specific commands that need running first\ntask prepare =\u003e sub {\n  Rex::Plenv::Base::prepare(@_);  # @_ required for Rex::Ext::ParamLookup\n};\n\nauth for =\u003e 'prepare' =\u003e user =\u003e 'root';\n\ntask setup =\u003e sub {\n  Rex::Plenv::Base::setup(@_);    # @_ required for Rex::Ext::ParamLookup\n};\n```\n\nOnce you have your service's Rexfile created, you need to run your tasks.\n\n```bash\nssh-copy-id root@yourhost.org\nrex -H yourhost.org prepare   # will run this as -u root automatically\nssh-copy-id someuser@yourhost.org\nrex -H yourhost.org -u someuser setup\n```\n\n## meta.yml\n\nIn the folder for the Rex service you're creating, add a `meta.yml` file with\nsomething that looks like the following.\n\n```perl\nName: Some frontend service\nDescription: The frontend service for something\nAuthor: Paul Williams \u003ckwakwa@cpan.org\u003e\nRequire:\n  Rex::Plenv::Base:\n    git: https://github.com/kwakwaversal/rex-plenv-base.git\n    branch: master\n```\n\nOnce all your dependencies are configured for the service, run `rexify\n--resolve-deps` to bundle the module.\n\n## Options\n\nIf you want to install a specific version of Perl, you can pass the optional\ntask parameter `--perl_version=5.20.0`.\n\n```bash\nssh-copy-id someuser@yourhost.org\nrex -H yourhost.org -u someuser setup --perl_version=5.22.0\n```\n\n# Additional configuration\n\nIf you have a firewall, and need to punch a hole in it to be able to install\nplenv, the configuration below might/should help.\n\n## iptables\n\n```bash\n-A FORWARD -o eth0 -j PLENV-ENV\n-A PLENV-ENV -m state --state ESTABLISHED,RELATED -j ACCEPT\n-A PLENV-ENV -d 192.30.252.0/22 -p tcp -m tcp --dport 22    -m comment --comment \"ssh://github.com\" -j ACCEPT\n-A PLENV-ENV -d 192.30.252.0/22 -p tcp -m tcp --dport 443   -m comment --comment \"https://github.com\" -j ACCEPT\n-A PLENV-ENV -d 192.30.252.0/22 -p tcp -m tcp --dport 9418  -m comment --comment \"git://github.com\" -j ACCEPT\n-A PLENV-ENV -d 207.171.7.91    -p tcp -m tcp --dport 80    -m comment --comment \"cpan.org\" -j ACCEPT\n-A PLENV-ENV -d 94.242.223.198  -p tcp -m tcp --dport 80    -m comment --comment \"cpan.org\" -j ACCEPT\n```\n\n# See also\n * [Rex::NTP::Base](https://github.com/krimdomu/rex-ntp-base.git)\n * [Rex::OS::Base](https://github.com/krimdomu/rex-os-base.git)\n * [Example of a complete Rex code infrastructure](http://www.rexify.org/docs/rex_book/infrastructure/example_of_a_complete_rex_code_infrastructure.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkwakwaversal%2Frex-plenv-base","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkwakwaversal%2Frex-plenv-base","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkwakwaversal%2Frex-plenv-base/lists"}