Skip to main content.
home | support | download

Back to List Archive

RE: swish.cgi not returning results from search

From: Bill Moseley <moseley(at)not-real.hank.org>
Date: Tue Jan 06 2004 - 22:15:48 GMT
On Tue, Jan 06, 2004 at 01:33:43PM -0800, Steve OBrien wrote:
> I am getting this in my apache logs, any ideas?
> 
> [Tue Jan 06 01:29:51 2004] [error] [client 192.168.2.207] 
> /usr/local/apache2/cgi-bin/citysearch.cgi Can't locate object method "new" 
> via package "PhraseHighlight" at /usr/local/apache2/cgi-bin/citysearch.cgi 
> line 1456, <GEN0> chunk 33., referer: 
> http://192.168.2.247/cgi-bin/citysearch.cgi?query=police&submit=Search%21&metaname=swishdefault&sort=swishrank

Didn't this just come up a few days ago?

    506) ~ %cat Foo.pm
    package Not::Foo;
    sub new { "hello" }
    1;

    507) ~ %perl -MFoo -le 'print Foo->new()'
    Can't locate object method "new" via package "Foo" at -e line 1.

Notice the incorrect package name.  I loaded "Foo.pm" but the file has
"package Not::Foo;".

    508) ~ %perl -MFoo -le 'print Not::Foo->new()'
    hello

That message says:

    via package "PhraseHighlight"

but the package is really "SWISH::PhraseHighlight".  Someplace it's
listed (like in your config file) without the SWISH:: part.

    510) ~ %perl -MFoo -le 'print BLA::Foo->new()'
    Can't locate object method "new" via package "BLA::Foo" at -e line 1.

BTW -- how old is your version of perl?  5.6.1 says:

$perl -le 'print Foo->new()'
Can't locate object method "new" via package "Foo" (perhaps you forgot to load "Foo"?) at -e line 1.

-- 
Bill Moseley
moseley@hank.org
Received on Tue Jan 6 22:16:29 2004