A fast, cross-platform Perl development toolkit. Manages Perl installations, modules, and execution environments from a single Go binary.
- PVM - Install, switch, and manage Perl versions
- PSC - Parse and analyze Perl source code
- PM - Install and manage CPAN modules
- PVX - Run Perl scripts in isolated environments
curl -fsSL https://pvm.tools/install.sh | shInstalls to ~/.local/bin/pvm. Set PVM_INSTALL_DIR to change the location.
Then add shell integration to your profile:
# bash (~/.bashrc) or zsh (~/.zshrc)
eval "$(pvm init)"
# fish (~/.config/fish/config.fish)
pvm init | source
# PowerShell ($PROFILE)
pvm init | Invoke-ExpressionRequires Go 1.24+. No C compiler or external tools needed.
git clone https://github.com/perigrin/pvm.git
cd pvm
make# Install a Perl version
pvm install 5.40.2
# Switch to it
pvm use 5.40.2
# Set it as default
pvm global 5.40.2
# List installed versions
pvm versions
# Install a CPAN module
pm install Mojolicious
# Run a script
pvx script.pl
# Parse a Perl file
psc parse lib/MyModule.pmPVM resolves the active Perl version in this order:
PVM_PERL_VERSIONenvironment variable.perl-versionfile in current or parent directory- Global version set via
pvm global - System Perl
This is compatible with plenv's .perl-version files. PVM can also
detect and use Perl versions installed by plenv or perlbrew.
PSC provides tools for inspecting Perl source code using a pure-Go parser (no external dependencies).
# Display the AST of a Perl file
psc parse lib/MyModule.pm
# Show as S-expression
psc parse --format sexpr lib/MyModule.pm
# Analyze dependencies
psc analyze lib/Configuration uses TOML files following the XDG Base Directory spec:
- User:
~/.config/pvm/pvm.toml - Project:
.pvm/pvm.toml
All configuration is optional. PVM works out of the box with sensible defaults.
pvm config show # Show current config
pvm config init # Create default configSingle Go binary with multiple entry points via symlink detection.
Invoke as pvm, pvx, pm, or psc for component-specific
behavior.
pvm symlinks create # Create symlinks for all components
pvm symlinks verify # Check symlinks existmake # Build all four binaries
make test # Run test suite
make clean # Clean build artifacts
make cross-compile # Build for all platformsPure Go with no CGO. Cross-compiles to Linux, macOS, and Windows without a C compiler.
PVM integrates with existing Perl version managers:
pvm import-from plenv # Register plenv-installed Perls
pvm import-from perlbrew # Register perlbrew-installed PerlsArtistic License 2.0