Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Can't locate loadable object for module JSON::XS in @INC

by newperlguy (Initiate)
on Oct 31, 2011 at 00:37 UTC ( [id://934795]=perlquestion: print w/replies, xml ) Need Help??

newperlguy has asked for the wisdom of the Perl Monks concerning the following question:

hi, I'm completely new to Perl. I've been handed a Perl a script which does a bunch of magical things and then ultimately talks to an Oracle db. It uses quite a few libraries including JASON:XS 2.01.

when I tried running the script locally on a Windows box or remotely on a UNIX box, I got the same error:

Can't locate loadable object for module JSON::XS in @INC

I've already downloaded the XS.pm and put it in the lib folder.

On Windows box, C:\programfiles2\Perl\lib\JSON\XS.pm

On UNIX box, /blah/blah/lib/JSON/XS.pm

any advice where to go from here? any help will be greatly appreciated. thx

(I'm guessing this is equivalent to the missing jar or class file in Java)

  • Comment on Can't locate loadable object for module JSON::XS in @INC

Replies are listed 'Best First'.
Re: Can't locate loadable object for module JSON::XS in @INC
by MVS (Monk) on Oct 31, 2011 at 01:48 UTC

    Since that's an XS module, it contains code that must be compiled, so you won't be able to just add the .pm files to the proper directories in this case. This documentation should help point you in the right direction for how to install CPAN modules on your version of Perl.

      thx for the info. there's no binary that I can just download ? thx

        Some distributions of Perl (including ActiveState Perl and Strawberry Perl) include a utility called PPM, which allows you to install the necessary scripts and binaries for the module without needing to compile anything.

Re: Can't locate loadable object for module JSON::XS in @INC
by GrandFather (Saint) on Oct 31, 2011 at 03:06 UTC

    In general you can't just copy module files around and expect things to work right. If you are using an Active State install of Perl use ppm to manage modules. If you are using most other installs or have built the Perl yourself then use cpan.

    True laziness is hard work

Log In?
Username:
Password:

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

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

    No recent polls found