in reply to Re^2: WWW-Search module that works
in thread WWW-Search module that works

OK .. now we're getting somewhere. You've provided some code (great) and told me it outputs nothing.

My tendency, whenever I create an object, is to make sure that the object is defined. So, in your example, I would check that $oSearch is defined after it's created, and die if not.

After that, I'd step through the program using the Perl debugger, and find out what's happening. Dump $sQuery and make sure it has something useful in it, and likewise, see what $oResult has.

Also, your shebang line is wrong. It should probably be

#!/usr/bin/perl -w
Try that out and let us know how it goes for you.

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

Replies are listed 'Best First'.
Re^4: WWW-Search module that works
by coder57 (Novice) on Jun 12, 2007 at 20:21 UTC
    I am using activeperl 5.86 so the she bang doesn't matter. The code is per the www-search-yahoo module. I have tried it with many search terms and each show nothing. I have updated to the most current version of www-search for each search engine listed, and the results are still the same where it is meant to print urls, it simply states for example WWW::Search::Yahoo repeatedly

      OK, but how about checking that you get a valid object back from the =new= constructor, and how about telling me what you see from within the debugger?

      Alex / talexb / Toronto

      "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

      A reply falls below the community's threshold of quality. You may see it by logging in.

      I am using activeperl 5.86 so the she bang doesn't matter.

      Not true. ActivePerl reads the shebang line and processes the options found on it.