Since, as you mentioned in the comments, each script is invoked by a Java application that requests as a scheduler, you do not need both modules βat onceβ. Instead, you just need one or the other for each script run. This can be handled by setting up the environment accordingly when an old or new script is called.
You can use solutions like Perlbrew to manage two or more completely different Perl installations if you want. This would be a good approach if you find that you need other differences between the old and new versions.
However, if you just want to change the versions of this single module, all you have to do is both install and change the module path when you call the script. There are various ways to do this, but you can simply use the command line switch :
perl -Idirectory script.pl
This will add the directory to @INC , a set of locations where modules are searched. If necessary, specify the old or new module (if you do so, make sure that no version of the module is in the standard path to the module, otherwise there will be uncertainty about the version you are using).
user1919238
source share