{"id":18350242,"url":"https://github.com/zakame/chef-perlbrew","last_synced_at":"2025-10-20T00:09:50.187Z","repository":{"id":36033635,"uuid":"40330186","full_name":"zakame/chef-perlbrew","owner":"zakame","description":"Chef cookbook for configuring and installing perlbrew","archived":false,"fork":false,"pushed_at":"2020-12-09T07:55:43.000Z","size":94,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T10:41:19.299Z","etag":null,"topics":["chef","hacktoberfest","perl"],"latest_commit_sha":null,"homepage":"https://supermarket.chef.io/cookbooks/perlbrew","language":"Ruby","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/zakame.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-06T22:44:06.000Z","updated_at":"2022-09-20T06:11:27.000Z","dependencies_parsed_at":"2022-08-26T02:51:02.591Z","dependency_job_id":null,"html_url":"https://github.com/zakame/chef-perlbrew","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/zakame/chef-perlbrew","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zakame%2Fchef-perlbrew","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zakame%2Fchef-perlbrew/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zakame%2Fchef-perlbrew/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zakame%2Fchef-perlbrew/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zakame","download_url":"https://codeload.github.com/zakame/chef-perlbrew/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zakame%2Fchef-perlbrew/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260261702,"owners_count":22982697,"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":["chef","hacktoberfest","perl"],"created_at":"2024-11-05T21:25:45.629Z","updated_at":"2025-10-20T00:09:50.096Z","avatar_url":"https://github.com/zakame.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Cookbook Version](https://img.shields.io/cookbook/v/perlbrew.svg)](https://supermarket.chef.io/cookbooks/perlbrew)\n[![Build Status](https://travis-ci.org/zakame/chef-perlbrew.svg)](https://travis-ci.org/zakame/chef-perlbrew)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0)\n\n# SYNOPSIS\n\n    # Method 1 - Include this cookbook's recipes in your cookbook/recipe:\n    include_recipe 'perlbrew'\n    include_recipe 'perlbrew::profile'\n\n    # Method 2 - Use this cookbook's resources in your cookbook/recipe:\n    perlbrew '/opt/perlbrew' do\n      perls         ['perl-5.30.2', 'perl-5.14.4']\n    end\n    perlbrew_profile ''/etc/profile.d/perlbrew.sh'\n\n# DESCRIPTION\n\nThis cookbook provides resources and recipes that can be used to\nconfigure, install, and manage the [Perlbrew](https://perlbrew.pl)\nenvironment.\n\nThis cookbook is tested on the following platforms:\n\n* Amazon Linux 2\n* CentOS/RHEL 7.x\n* Debian 10.x\n* Ubuntu 20.04 LTS\n\nUnlisted platforms in the same family, of similar or equivalent versions\nmay work with or without modification to this cookbook.  Pull requests\nto add support for other platforms are welcome.\n\nPerlbrew requires a system perl and the following programs to be\navailable during the installation process:\n\n* curl\n* patch\n\nPerlbrew compiles perl from source and requires a standard compiler\ntoolchain to be available; this cookbook will install this toolchain\nautomatically, if they are missing.\n\n# ATTRIBUTES\n\n### perlbrew_root\n\n    node['perlbrew']['perlbrew_root'] = '/opt/perlbrew'\n\nSets the `PERLBREW_ROOT` environment variable.\n\n### perls\n\n    node['perlbrew']['perls'] = [\"perl-5.14.2\", \"perl-5.12.3\"]\n\nSet an array of perls to install upon running the `perlbrew` recipe.\n\n### install_options\n\n    node['perlbrew']['install_options'] = '--noman --notest'\n\nSet a string of command line options for `perlbrew install`, such as\n`-Dusethreads`.\n\n### cpanm_options\n\n    node['perlbrew']['cpanm_options'] = '--notest'\n\nSet a string of command line options for `cpanm`.\n\n### self_upgrade\n\n    node['perlbrew']['self_upgrade'] = true\n\nAutomatically install the latest perlbrew version, `true` by default.\n\n# RECIPES\n\n### perlbrew\n\nInstalls/updates perlbrew along with\n[patchperl](https://metacpan.org/pod/Devel::PatchPerl) and\n[cpanm](https://metacpan.org/pod/App::cpanminus).  This is required for\nuse of the `perlbrew_*` resources.  Optionally installs perls specified\nin the `node['perlbrew']['perls']` attribute list.\n\n### perlbrew::profile\n\nThis recipe installs a file in `/etc/profile.d` that enables perlbrew\nfor all users, though the standard caveats mentioned in the perlbrew\ndocumentation do apply.\n\n# RESOURCES\n\n### perlbrew\n\n    # install perlbrew then perl-5.30.2\n    perlbrew '/opt/perlbrew' do\n      perls ['perl-5.30.2']\n      action :install\n    end\n\n    # remove perlbrew\n    perlbrew '/opt/perlbrew' do\n      action :remove\n    end\n\nThis resource provides actions to install / remove perlbrew using the directory\nspecified in the `node['perlbrew']['perlbrew_root']` attribute.\n\n* Attributes\n  * :perls - An array of strings representing perls to brew / install.\n  * :upgrade - A boolean flag to disable/enable the automatic upgrading of perlbrew. \n\n### perlbrew_profile\n\n    # set a perlbrew profile for all users, controlled by root\n    perlbrew_profile '/etc/profile.d/perlbrew.sh' do\n      mode     0644\n      owner    'root'\n      group    'root'\n      template 'perlbrew.sh.erb'\n      action   :install\n    end\n\n    # remove a perlbrew profile\n    perlbrew_profile '/etc/profile.d/perlbrew.sh' do\n      action :remove\n    end\n\nThis resource provides actions to install / remove the shell script that enables\nperlbrew for all users.\n\n* Attributes\n  * :mode - The file's default permissions.\n  * :group - The file's group association.\n  * :owner - The file's owner.\n  * :template - The template used to create the file.\n\n### perlbrew_perl\n\n    # perlbrew install perl-5.14.2 --noman --notest\n    perlbrew_perl 'perl-5.14.2' do\n      install_options '--noman --notest'\n      action          :install\n    end\n\n    # perlbrew install perl-5.14.2 --as 5.14\n    perlbrew_perl '5.14' do\n      version 'perl-5.14.2'\n    end\n\n    # perlbrew uninstall perl-5.14.2\n    perlbrew_perl 'perl-5.14.2' do\n      action :remove\n    end\n\nThis resource provides actions to brew and install perls into `node['perlbrew']['perlbrew_root']`.\n\n* Attributes\n  * :install_options - The options to be provided during brewing / installation.\n  * :version - The version of perl to install, in the `perl-X.Y.Z` format that perlbrew expects.\n\n### perlbrew_switch\n\n    # turn off active perlbrews and switch to system perl\n    perlbrew_switch 'off'\n\n    # switch to perl-5.14.2\n    perlbrew_switch 'perl-5.14.2'\n\nThis resource provides an action to switch between brewed perl installations / system perl.\n\n### perlbrew_lib\n\n    # create a 'mylib' local::lib for perl-5.14.2\n    perlbrew_lib 'mylib' do\n      perlbrew 'perl-5.14.2'\n      action   :create\n    end\n\n    # ditto\n    perlbrew_lib 'perl-5.14.2@mylib'\n\n    # remove 'perl-5.14.2@mylib'\n    perlbrew_lib 'perl-5.14.2@mylib' do\n      action :delete\n    end\n\nThis resource creates or removes a perlbrew-based local::lib library for a particular perl.\n\n* Attributes\n  * :perlbrew - The brewed perl to attach the library to (e.g. perl-5.14.2), and it is not\n     installed, the `perlbrew_perl` resource will be used to brew and install it.  If this \n     attribute is not specified, it will be derived from the `perlbrew_lib` name.\n\n### perlbrew_cpanm\n\n    # install some modules into perl-5.14.2@mylib\n    perlbrew_cpanm 'Modern Perl modules' do\n      modules  ['Modern::Perl', 'Task::Kensho']\n      perlbrew 'perl-5.14.2@mylib'\n      action   :install\n    end\n\nThis resource installs CPAN modules to a given perlbrew perl or local::lib using\ncpanm (App::cpanminus).\n\n* Attributes\n  * :modules - The list of module names to pass to `cpanm`.\n  * :perlbrew - The brewed perl (and optional library) to use for installing modules.\n\n### perlbrew_run\n\n    # execute a script under perl-5.14.2@mylib\n    perlbrew_run 'hello.pl' do\n      perlbrew 'perl-5.14.2@mylib'\n      action   :run\n    end\n\n    # execute a perl script string\n    perlbrew_run 'hello world' do\n      perlbrew 'perl-5.14.2@mylib'\n      command 'perl -wE \"say q{Hello World}\"'\n    end\n\nThis resource runs a bash command in the context of a given perlbrew perl or local::lib.\n\n* Attributes\n  * :command - The bash command to run, defaulting to the resource name\n    if not specified.\n  * :cwd - The directory to change into prior to running the command.\n  * :environment - The hash of environment variables to set prior to\n    running the command\n  * :perlbrew - The brewed perl (and optional library) to use for\n    running the command.\n\n# AUTHOR(S)\n\n* David A. Golden \u003cdagolden@cpan.org\u003e\n* J.R. Mash \u003cjrmash@cpan.org\u003e\n\n# CONTRIBUTOR(S)\n\n* Jaryd Malbin \u003cjaryd@duckduckgo.com\u003e\n\n# MAINTAINER(S)\n\n* Zak B. Elep \u003czakame@cpan.org\u003e\n\n# COPYRIGHT \u0026 LICENSE\n\nCopyright (c) 2012-2020, the above named AUTHORS, CONTRIBUTORS, and MAINTAINERS\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzakame%2Fchef-perlbrew","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzakame%2Fchef-perlbrew","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzakame%2Fchef-perlbrew/lists"}