No such thing as a small change | |
PerlMonks |
Re^6: help with "symbol lookup error" messageby Corion (Patriarch) |
on Feb 03, 2023 at 20:42 UTC ( [id://11150147]=note: print w/replies, xml ) | Need Help?? |
Yes, this is possible, but also, that way lies madness. If you go down that road, you will make things much harder for you, and you will have to debug lots of weird errors. You are much better served by re-installing a fresh copy of all modules with your current Perl, and keeping your modules (say) in a cpanfile so you can reinstall them quickly whenever you move to a new version. Perl will not reload a module if it has already been loaded. A first, horrible approach is to manually pre-load all the modules you want from the appropriate directories:
An even more horrible way is to set up a hook in @INC which looks at the file to be loaded and chooses the correct one:
This will be even harder to debug but allows you to have deep dependencies automatically resolved without preloading modules. Again, my advice is to do a fresh start and keep a list of all modules you need, and use local::lib and to install all dependencies below a directory separate from the system Perl directory.
In Section
Seekers of Perl Wisdom
|
|