Archive for August 26th, 2008

Fixing Net::Google error with 404 File does not exist

Tuesday, August 26th, 2008

I was trying to install Net::Google 1.0 using CPANPLUS on my Mac OS X 10.5 machine, and kept getting a pesky error:

Service description 'file:' can't be loaded: 404 File `' does not exist  

One thing I had to do to fix it was install an apparent prerequisite, SOAP::WSDL. It wasn’t included by CPANPLUS.

Another thing I had to do to make the tests run was to include the lib/ (not just the blib/) directory in @INC when running the tests:

perl -Iblib/lib -Ilib t/001-search.t  

Even though that made the tests succeed, the installed module still wouldn’t work and gave the same darn error.

It turns out that some deeply, deeply nested code in Net::Google searches through @INC to find:

$DIR/Net/Google/Services/GoogleSearch.wsdl  

This file doesn’t get installed by “make install”, unfortunately.

So, I had to do the following:

rlucas:/Library/Perl/5.8.8/Net/Google$ sudo mkdir Services Password: rlucas:/Library/Perl/5.8.8/Net/Google$ cd Services/ rlucas:/Library/Perl/5.8.8/Net/Google/Services$ sudo cp \ ~/.cpanplus/5.8.8/build/Net-Google-1.0/lib/Net/Google/Services/GoogleSearch.wsdl \ .  

Now my Net::Google using scripts seem to work right.