I have a scenario with hundreds of servers with different Perl versions and operating systems. On these servers, I need to run a script which decodes a JSON file. I can push additional libraries to the servers via a shared directory, but due to the different Perl versions, they can't contain XS code.
I'd like to leverage a pre-installed JSON::XS wherever possible and fall back to JSON::PP otherwise. Caveat: I use boolean_values(), which is only available from version 4.0. Various servers have only JSON::XS version 3.0.1, so this call fails.
Is there any way to use JSON::XS only if it has a certain minimum version / supports a certain method and use PP otherwise?
I also tried -support_by_pp, but it didn't help here.
I have a scenario with hundreds of servers with different Perl versions and operating systems. On these servers, I need to run a script which decodes a JSON file. I can push additional libraries to the servers via a shared directory, but due to the different Perl versions, they can't contain XS code.
I'd like to leverage a pre-installed JSON::XS wherever possible and fall back to JSON::PP otherwise. Caveat: I use
boolean_values()
, which is only available from version 4.0. Various servers have only JSON::XS version 3.0.1, so this call fails.Is there any way to use JSON::XS only if it has a certain minimum version / supports a certain method and use PP otherwise? I also tried
-support_by_pp
, but it didn't help here.