http://qs321.pair.com?node_id=168916

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

Dear monks,

I just wrote an Perl "survey script" which uses CGI.pm and XML::Simple.

The program works fine, however, when I upload it to my webserver - which is virtually hosted :( - It dies. Not gracefully, either... the browser reports that it's still "Waiting Request."

Here's the error message from the server log.

Can't locate loadable object for module XML::Parser::Expat in @INC (@I +NC contains: /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /us +r/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 + /usr/lib/perl5/site_perl .) at XML/Parser.pm line 15 Compilation failed in require at XML/Parser.pm line 15. BEGIN failed--compilation aborted at XML/Parser.pm line 27. Compilation failed in require at XML/Simple.pm line 224.

So I thought, and I remembered that I asked in the chatterbox if one could use a module, even if one doesn't have access to that machine. I was told that you could, either by simply uploading it, or putting the guts of the module in your file.

I tried uploading XML::Simple, and all its dependencies (The entire XML, LWP, and URI directories under perl/site/lib), to no avail. I also added

BEGIN{ push (@INC, "/home/httpd/vhosts/newrisedesigns.com/cgi-bin", "/home/httpd/vhosts/newrisedesigns.com/cgi-bin/XML", /home/httpd/vhosts/newrisedesigns.com/cgi-bin/XML/Parser"); }

I'd like to keep the XML component (it's how the votes are stored on the server) however, I might have to scrap it if I can't get it working. :(

I'm stuck again, and I greatly appreciate any help you are willing to offer.

John J Reiser
newrisedesigns.com