in reply to Dynamic $^X

I can not understand, why are you going in such complex ways here. Maybe I'm missing something from your description.

There's "require VERSION" and/or "use VERSION" that you can use in your modules and scripts to make sure, that they are not pulled in by wrong interpreter. In the cases, where you want to try your code with specific interpreter just use the desired binary directly

/usr/bin/perl.5.xx my_script.pl

After all, if you create a module that is not compatible with the perl that you are shipping, then this module won't be shipped, since it is useless.

If you want to have both versions of some module (for older and newer perl) then put them in different directories and in the script have something like

BEGIN{ unshift @INC, $ENV{MY_MODULES_DIR} if exists $ENV{MY_MODULES_DIR}; } use MyModule;

Now you can run your script as

MY_MODULES_DIR=experimental perl.5.xx my_script.pl
Or even create a small shell wrapper like
#!/bin/sh export MY_MODULES_DIR=experimental export OTHER_VARIABLE=value exec "$@"
and use it as
myenv perl5.xx my_script.pl

As usually, there's more than one way to do it. Maybe you'll find above something that would help you :)