Program Version Switch allows users to quickly switch between different interpreter versions for easy management.
Developers of interpreter-based programs that initiate through a hash-bang line (#!) find this software extremely beneficial. If you install different perl versions on your machine, instead of calling the particular perl binary you wish to use, you could use the following example to implement it: "perl myscript.pl /path/to/another/perl myscript.pl". Although it works well, it is inconvenient.
If you start your program using the hash-bang line and initiate it by "./myscript.pl," you will have to alter the file; thus, using another perl version would still be inconvenient. That's where pvswitch comes in. Its purpose is to resolve such situations conveniently. Furthermore, it resolves some problems that arise when multiple people want to use various perl versions.
pvswitch enables you to run one program in two shells with different perl versions with ease. Thanks to pvswitch, a single program can be executed with different versions in separate sessions. The software will be installed as a new program binary, and the old one will be renamed to program.pvswitch. Every time you execute this program, pvswitch will be executed.
Regardless of how you start a program, whether it's "perl myscript.pl" or "./myscript.pl" if it has a hash-bang '#! /usr/bin/perl,'" the pvswitch binary will be executed. pvswitch will check the environment variable PVSWITCH_PERL_BINARY (if you're running perl) and will look for this key in the pvswitch.conf configuration file. It will then execute the program that is configured for the selected version set in the environment variable (e.g., perl.pvswitch). In this way, a distinct version can be chosen, depending on the environment.
There are some convenient tools available (e.g., perlver, pvconfig) to configure this software. The software's latest update features a bug fix that could lead to a segmentation violation. Overall, pvswitch is an exceptional software that offers users incredible convenience and flexibility.
Version 1.03: N/A