agweih has asked for the wisdom of the Perl Monks concerning the following question:
Dear monks,
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!
greetings, Toni
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: use alternate module if pm is not installed
by choroba (Cardinal) on Apr 07, 2021 at 09:17 UTC | |
|
Re: use alternate module if pm is not installed
by hippo (Archbishop) on Apr 07, 2021 at 09:20 UTC | |
|
Re: use alternate module if pm is not installed
by haukex (Archbishop) on Apr 07, 2021 at 09:15 UTC | |
|
Re: use alternate module if pm is not installed
by Fletch (Bishop) on Apr 07, 2021 at 13:42 UTC | |
|
Re: use alternate module if pm is not installed
by agweih (Initiate) on Apr 07, 2021 at 10:11 UTC | |
|
Re: use alternate module if pm is not installed
by xiaoyafeng (Deacon) on Apr 07, 2021 at 14:00 UTC | |
|
Re: use alternate module if pm is not installed
by Anonymous Monk on Apr 07, 2021 at 23:02 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |