{"id":13727978,"url":"https://github.com/tokuhirom/plenv","last_synced_at":"2025-04-12T19:42:54.032Z","repository":{"id":845605,"uuid":"571655","full_name":"tokuhirom/plenv","owner":"tokuhirom","description":"Perl binary manager","archived":false,"fork":false,"pushed_at":"2023-07-30T11:13:28.000Z","size":1771,"stargazers_count":514,"open_issues_count":30,"forks_count":70,"subscribers_count":47,"default_branch":"master","last_synced_at":"2024-10-11T20:56:33.664Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","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/tokuhirom.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}},"created_at":"2010-03-20T18:48:43.000Z","updated_at":"2024-10-10T01:54:03.000Z","dependencies_parsed_at":"2024-02-04T14:08:49.741Z","dependency_job_id":null,"html_url":"https://github.com/tokuhirom/plenv","commit_stats":{"total_commits":275,"total_committers":35,"mean_commits":7.857142857142857,"dds":"0.31272727272727274","last_synced_commit":"2ef6c6458e2cc2fcaef29c760c14aa5657f09d1a"},"previous_names":[],"tags_count":46,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tokuhirom%2Fplenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tokuhirom%2Fplenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tokuhirom%2Fplenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tokuhirom%2Fplenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tokuhirom","download_url":"https://codeload.github.com/tokuhirom/plenv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248625429,"owners_count":21135512,"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-08-03T02:00:35.786Z","updated_at":"2025-04-12T19:42:54.004Z","avatar_url":"https://github.com/tokuhirom.png","language":"Shell","funding_links":[],"categories":["Development Tools","Shell","List of \\*env-, ch\\*- and \\*vm- style version managers","Version Managers"],"sub_categories":["Perl"],"readme":"# NAME\n\nplenv - perl binary manager\n\n# SYNOPSIS\n\n    plenv help\n\n    # list available perl versions\n    plenv install --list\n\n    # install perl5 binary\n    plenv install 5.16.2 -Dusethreads\n\n    # execute command on current perl\n    plenv exec ack\n\n    # change global default perl to 5.16.2\n    plenv global 5.16.2\n\n    # change local perl to 5.14.0\n    plenv local 5.14.0\n\n    # run this command after install cpan module, contains executable script.\n    plenv rehash\n\n    # install cpanm to current perl\n    plenv install-cpanm\n\n    # migrate modules(install all installed modules for 5.8.9 to 5.16.2 environment.)\n    plenv migrate-modules 5.8.9 5.16.2\n\n    # locate a program file in the plenv's path\n    plenv which cpanm\n\n    # display version\n    plenv --version\n\n# DESCRIPTION\n\nUse plenv to pick a Perl version for your application and guarantee\nthat your development environment matches production. Put plenv to work\nwith [Carton](https://github.com/miyagawa/carton/) for painless Perl upgrades and bulletproof deployments.\n\n# plenv vs. perlbrew\n\nLike perlbrew, plenv installs perls under your home directory and lets you install modules locally, and allows you to switch to arbitrary perl versions on your shell.\n\nUnlike perlbrew, plenv is implemented in bash, and provides simple shell script wrappers (called \"shims\") for each perl executable files. It doesn't export any shell functions that switches `PATH` before running commands.\n\nUnlike perlbrew, plenv allows you to set local perl version per directory, using `.perl-version` file.\n\nUnlike perlbrew, plenv doesn't provide built-in local::lib integrations, but [plenv-contrib](https://github.com/miyagawa/plenv-contrib) implements `use` and `lib` commands for a replacement.\n\n## INSTALLATION\n\n**Compatibility note**: plenv is _incompatible_ with perlbrew. Please make\n  sure to fully uninstall perlbrew and remove any references to it from\n  your shell initialization files before installing plenv.\n\nIf you're on Mac OS X, consider\n[installing with Homebrew](#homebrew-on-mac-os-x).\n\n\n### Basic GitHub Checkout\n\nThis will get you going with the latest version of plenv and make it\neasy to fork and contribute any changes back upstream.\n\n1. Check out plenv into `~/.plenv`.\n\n    ~~~ sh\n    $ git clone https://github.com/tokuhirom/plenv.git ~/.plenv\n    ~~~\n\n2. Add `~/.plenv/bin` to your `$PATH` for access to the `plenv`\n   command-line utility.\n\n    ~~~ sh\n    $ echo 'export PATH=\"$HOME/.plenv/bin:$PATH\"' \u003e\u003e ~/.bash_profile\n    ~~~\n\n    **Ubuntu note**: Modify your `~/.profile` instead of `~/.bash_profile`.\n\n    **Zsh note**: Modify your `~/.zshrc` file instead of `~/.bash_profile`.\n\n3. Add `plenv init` to your shell to enable shims and autocompletion.\n\n    ~~~ sh\n    $ echo 'eval \"$(plenv init -)\"' \u003e\u003e ~/.bash_profile\n    ~~~\n\n    _Same as in previous step, use `~/.profile` on Ubuntu._\n    \n    **Zsh note**: Use `echo 'eval \"$(plenv init - zsh)\"' \u003e\u003e ~/.zshrc`\n\n4. Restart your shell as a login shell so the path changes take effect.\n    You can now begin using plenv.\n\n    ~~~ sh\n    $ exec $SHELL -l\n    ~~~\n\n5. Install [perl-build](https://github.com/tokuhirom/perl-build),\n   which provides a `plenv install` command that simplifies the\n   process of installing new Perl versions.\n\n    ~~~\n    $ git clone https://github.com/tokuhirom/Perl-Build.git ~/.plenv/plugins/perl-build/\n    $ plenv install 5.18.0\n    ~~~\n\n   As an alternative, you can download and compile Perl yourself into\n   `~/.plenv/versions/`.\n\n6. Rebuild the shim executables. You should do this any time you\n   install a new Perl executable (for example, when installing a new\n   Perl version, or when installing a cpanm that provides a command).\n\n    ~~~\n    $ plenv rehash\n    ~~~\n\n#### Upgrading\n\nIf you've installed plenv manually using git, you can upgrade your\ninstallation to the cutting-edge version at any time.\n\n~~~ sh\n$ cd ~/.plenv\n$ git pull\n~~~\n\nTo use a specific release of plenv, check out the corresponding tag:\n\n~~~ sh\n$ cd ~/.plenv\n$ git fetch\n$ git checkout 2.0.0\n~~~\n\n### Installation Without Git\n\nTo install on a system without git, simply download the latest archive\nand unpack it to `~/.plenv`. You will need to repeat this process to\nupgrade your installation.\n\n~~~ sh\n$ wget -O plenv.tar.gz https://github.com/tokuhirom/plenv/archive/master.tar.gz\n$ mkdir ~/.plenv\n$ tar --directory=~/.plenv --strip-components=1 -zxvf plenv.tar.gz\n~~~\n\nFollow the remaining standard instructions starting at step 2 of\n[Basic GitHub Checkout](#basic-github-checkout).\n\nPlugins such as perl-build and plenv-contrib will need to be installed\ninto `~/.plenv/plugins` similarly.\n\n~~~ sh\n$ wget -O perl-build.tar.gz https://github.com/tokuhirom/Perl-Build/archive/master.tar.gz\n$ mkdir -p ~/.plenv/plugins/perl-build\n$ tar --directory=~/.plenv/plugins/perl-build --strip-components=1 -zxvf perl-build.tar.gz\n~~~\n\n### Homebrew on Mac OS X\n\nYou can also install plenv using the\n[Homebrew](https://brew.sh/) package manager on Mac OS\nX.\n\n~~~\n$ brew update\n$ brew install plenv\n$ brew install perl-build\n~~~\n\nTo later update these installs, use `upgrade` instead of `install`.\n\nAfterwards you'll still need to add `eval \"$(plenv init -)\"` to your\nprofile as stated in the caveats. You'll only ever have to do this\nonce.\n\n\n### Neckbeard Configuration\n\nSkip this section unless you must know what every line in your shell\nprofile is doing.\n\n`plenv init` is the only command that crosses the line of loading\nextra commands into your shell. Here's what `plenv init` actually does:\n\n1. Sets up your shims path. This is the only requirement for plenv to\n   function properly. You can do this by hand by prepending\n   `~/.plenv/shims` to your `$PATH`.\n\n2. Installs autocompletion. This is entirely optional but pretty\n   useful. Sourcing `~/.plenv/completions/plenv.bash` will set that\n   up. There is also a `~/.plenv/completions/plenv.zsh` for Zsh\n   users.\n\n3. Rehashes shims. From time to time you'll need to rebuild your\n   shim files. Doing this automatically makes sure everything is up to\n   date. You can always run `plenv rehash` manually.\n\n4. Installs the sh dispatcher. This bit is also optional, but allows\n   plenv and plugins to change variables in your current shell, making\n   commands like `plenv shell` possible. The sh dispatcher doesn't do\n   anything crazy like override `cd` or hack your shell prompt, but if\n   for some reason you need `plenv` to be a real script rather than a\n   shell function, you can safely skip it.\n\nRun `plenv init -` for yourself to see exactly what happens under the\nhood.\n\n# DEPENDENCIES\n\n    * Perl 5.8.1+\n    * bash\n    * curl(If you want to use plenv install-cpanm)\n\n### FreeBSD users\n\nMount fdescfs on `/dev/fd` for using bash.\nPlease add following line to `/etc/fstab` and restart.\n\n```\nfdesc\t/dev/fd\t\tfdescfs\t\trw\t0\t0\n```\n\n## Command Reference\n\nLike `git`, the `plenv` command delegates to subcommands based on its\nfirst argument. The most common subcommands are:\n\n### plenv local\n\nSets a local application-specific perl version by writing the version\nname to a `.perl-version` file in the current directory. This version\noverrides the global version, and can be overridden itself by setting\nthe `PLENV_VERSION` environment variable or with the `plenv shell`\ncommand.\n\n    $ plenv local 5.8.2\n\nWhen run without a version number, `plenv local` reports the currently\nconfigured local version. You can also unset the local version:\n\n    $ plenv local --unset\n\nPrevious versions of plenv stored local version specifications in a\nfile named `.plenv-version`. For backwards compatibility, plenv will\nread a local version specified in a `.plenv-version` file, but a\n`.perl-version` file in the same directory will take precedence.\n\n### plenv global\n\nSets the global version of perl to be used in all shells by writing\nthe version name to the `~/.plenv/version` file. This version can be\noverridden by an application-specific `.perl-version` file, or by\nsetting the `plenv_VERSION` environment variable.\n\n    $ plenv global 5.8.2\n\nThe special version name `system` tells plenv to use the system perl\n(detected by searching your `$PATH`).\n\nWhen run without a version number, `plenv global` reports the\ncurrently configured global version.\n\n### plenv shell\n\nSets a shell-specific perl version by setting the `plenv_VERSION`\nenvironment variable in your shell. This version overrides\napplication-specific versions and the global version.\n\n    $ plenv shell 5.8.2\n\nWhen run without a version number, `plenv shell` reports the current\nvalue of `plenv_VERSION`. You can also unset the shell version:\n\n    $ plenv shell --unset\n\nNote that you'll need plenv's shell integration enabled (step 3 of\nthe installation instructions) in order to use this command. If you\nprefer not to use shell integration, you may simply set the\n`PLENV_VERSION` variable yourself:\n\n    $ export PLENV_VERSION=5.8.2\n\n### plenv versions\n\nLists all perl versions known to plenv, and shows an asterisk next to\nthe currently active version.\n\n    $ plenv versions\n      system\n      5.12.0\n      5.14.0\n      5.16.1\n      5.16.2\n      5.17.11\n      5.17.7\n      5.17.8\n      5.18.0\n      5.18.0-RC3\n      5.18.0-RC4\n    * 5.19.0 (set by /home/tokuhirom/.plenv/version)\n      5.6.2\n      5.8.1\n      5.8.2\n      5.8.3\n      5.8.5\n      5.8.9\n\n### plenv version\n\nDisplays the currently active perl version, along with information on\nhow it was set.\n\n    $ plenv version\n    5.19.0 (set by /home/tokuhirom/.plenv/version)\n\n### plenv rehash\n\nInstalls shims for all perl executables known to plenv (i.e.,\n`~/.plenv/versions/*/bin/*`). Run this command after you install a new\nversion of perl, or install a cpanm that provides commands.\n\n    $ plenv rehash\n\n### plenv which\n\nDisplays the full path to the executable that plenv will invoke when\nyou run the given command.\n\n    $ plenv which cpanm\n    /home/tokuhirom/.plenv/versions/5.19.0/bin/cpanm\n\n### plenv whence\n\nLists all perl versions with the given command installed.\n\n    $ plenv whence plackup\n    5.17.11\n    5.17.7\n    5.18.0\n    5.18.0-RC4\n    5.19.0\n\n# FAQ\n\n- How can I install cpanm?\n\n    Try using the following command:\n\n        % plenv install-cpanm\n\n    This command installs cpanm in the current environment.\n\n    If you are installing via a proxy and encounter problems you can set curl arguments via PLENV_INSTALL_CPANM (default is **-p**):\n\n        % PLENV_INSTALL_CPANM=\"-v\" plenv install-cpanm\n\n- How can I install the modules I used in another Perl environment in my new one?\n\n    You can use the ` migrate-modules ` subcommand.\n\n        % plenv migrate-modules 5.8.2 5.16.2\n\n    It makes a list of the installed modules in 5.8.2, and installs the newest versions of those modules\n    to the 5.16.2 environment. Note that because the module version won't necessarily be the same between\n    the two versions, there may be changes that affect compatibility, dependencies, or other behaviors\n    your applications depend on.\n\n    You can reuse installed modules from a binary-compatible perl version\n    directly without reinstalling. For example, if you have installed lots of\n    modules in 5.18.1 and install a variant of 5.18.1 with dtrace support,\n    you might not want to migrate all those modules.\n\n        % plenv install 5.18.1 -Dusedtrace --as 5.18.1-dtrace\n        % plenv shell 5.18.1-dtrace\n        % PERL5LIB=$(PLENV_VERSION=5.18.1 perl -e'print join \":\",@INC') perl \u003ccommand\u003e\n\n- How can I enable -g option without slowing down binary?\n\n    Use following command.\n\n        % plenv install 5.16.2 -DDEBUGGING=-g\n\n- How can I uninstall plenv ?\n\n    Remove plenv configuration lines(`plenv init` and PATH) from your shell start up configuration. And remove `plenv` directory as below.\n\n        % rm -rf `plenv root`\n\n# BUG REPORTING\n\nPlese use github issues: [https://github.com/tokuhirom/plenv/](https://github.com/tokuhirom/plenv/).\n\n# AUTHOR\n\nTokuhiro Matsuno \u003ctokuhirom AAJKLFJEF@ GMAIL COM\u003e\n\n# SEE ALSO\n\n[App::perlbrew](https://search.cpan.org/perldoc?App::perlbrew) provides the same features. But plenv provides project local file: __ .perl-version __.\n\nMost of part was inspired from [rbenv](https://github.com/sstephenson/rbenv).\n\n# LICENSE\n\n## plenv itself\n\nCopyright (C) Tokuhiro Matsuno\n\nThis library is free software; you can redistribute it and/or modify\nit under the same terms as Perl itself.\n\n## rbenv\n\nplenv uses rbenv code\n\n    (The MIT license)\n\n    Copyright (c) 2013 Sam Stephenson\n\n    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\n    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftokuhirom%2Fplenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftokuhirom%2Fplenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftokuhirom%2Fplenv/lists"}