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

Wise monks, I beseech thee to lifteth the basket of ignorance from my head and let the light of knowledge shine.
I'm not a perl guy, I'm just trying to build some existing code. System is WinXP Pro running whichever version of Cygwin was current as of yesterday. Cygwin has perl and gcc installed, as well as anything else I should need to build. For those not in the know, cygwin brings the joys of Unix to the wasteland of Windows.
One of my files starts with "use XML::Parse". Okey dokey, I got that from CPAN. It wants Expat. Didnt' see a package on CPAN, but I did find Expat.pm. So I grabbed it. Running, I get "Can't locate loadable object for module XML::Parser::Expat". I'm assuming I need a binary version of Expat. So I've got it, and was ready to configure it when I thought "hmmm, where in blazes should I install it to?" I'm also wondering what I should build. A dll of some sort?
So. Where do I install it to. Or am I completely on the wrong track here, and need to do something different?
Thanks.

Replies are listed 'Best First'.
Re: Installing XML::Parser
by mirod (Canon) on Apr 14, 2004 at 21:54 UTC

    From the README:

    This is a Perl extension interface to James Clark's XML parser, expat. It requires at least version 5.004 of perl and it requires that you ha +ve release 1.95.0 or greater of expat installed. You can download expat from: http://sourceforge.net/projects/expat/

    Everything is there.

      Yeah, that's where I got the source tarball from. But is there anywhere in particular I should install it? /bin? /usr/bin? /lib/expat.dll?
      OK, I just configured, built, and installed it to the default, which is /usr/local/{bin|lib}. But I still get the original error message.
      How exactly do I figure out where perl is looking for my code at? For that matter, how do I figure out *what* code perl is looking for? I've stared at Expat.pm, but as I don't know perl nothing jumps out at me.
        I don't know the particulars of how Cygwin manages its shell environment, and I would have expected the XML::Parser module installation to look in /usr/local/lib by default. Just as a wild guess, you might try doing this in the shell before you try installing the module:
        export LD_LIBRARY_PATH=/usr/local/lib
        That's what I would do if I was having this sort of trouble on a unix box. Whether Cygwin goes to this length in emulating unix is outside my experience.
Re: Installing XML::Parser
by iburrell (Chaplain) on Apr 15, 2004 at 20:23 UTC
    Did you get the Cygwin version of expat? There is a Cygwin package, installed through the Cygwin setup, for expat. I am assuming it includes the DLL and development headers. You will also need the development tools, gcc, make, etc.