|Pathologically Eclectic Rubbish Lister|
use alternate module if pm is not installedby agweih (Initiate)
|on Apr 07, 2021 at 08:46 UTC||Need Help??|
agweih has asked for the wisdom of the Perl Monks concerning the following question:
my perlscript should run on different systems (windows, linux) where I don't know which modules are installed and I don't have permission to install modules.
Therefore I'm looking for a way to fallback to core modules or my own pm with basic functionality if a module is not installed.
My naive thought was using something like this:use JSON || JSON::PP;
this does of course not work.
What's the best way to do this?
thanks in advance!