in reply to How do I tell if my code is using JSON::PP or JSON::XS?

Hi,

I thought that ‘use JSON’ would detect the availability of the XS module and use it if possible, is that correct?

Yep.

You can always find out what modules you've loaded by examining %INC:

$ perl -MJSON -E 'say for keys %INC' Exporter/Heavy.pm overload.pm Exporter.pm JSON.pm warnings.pm Types/Serialiser.pm overloading.pm Carp.pm warnings/register.pm strict.pm common/sense.pm XSLoader.pm JSON/XS.pm feature.pm attributes.pm

Hope this helps!


The way forward always starts with a minimal test.