Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: How do I tell if my code is using JSON::PP or JSON::XS?

by 1nickt (Canon)
on Nov 16, 2020 at 13:57 UTC ( [id://11123688]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11123688]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-24 23:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found