Perlfect Solutions
 

[Perlfect-search] Newbie problem with perlfect's search.pl

Ian Kennedy ian.kennedy@systemc.com
Fri, 9 Feb 2001 12:13:53 -0000
This is a multi-part message in MIME format.

------=_NextPart_000_0000_01C09291.C4DE2560
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Hi,

I am trying to setup perlfect search on a local web server.

I have indexed my test web site (MS Personal web server on NT Wkstn). All
ok.
I have modified 3 lines of search.pl following the advice of the in-file
comments:

<snippet from searcg.pl>
......

# If you're using Windows NT you might need to comment in the next two lines
# and remove 'use Perlfect::Template;' below. Instead of foobar use the same
# value that you're using for $INSTALL_DIR in conf.pl.
 push(@INC, "e:\webroot\cgi\perlfect\search\");
 require Perlfect::Template;
# use Perlfect::Template;

......

In it's orignal state, a syntax check (ie: perl -c search.pl) returns all ok

With the lines altered as above I get the errors listed below.

Can anyone help?

TIA

Ian Kennedy
Ian.kennedy@systemc.com

Errors below
===========

E:\WebRoot\cgi\perlfect\search>perl -c search.pl > f:\temp\p.txt
[Fri Feb  9 12:03:03 2001] search.pl: String found where operator expected
at se
arch.pl line 43, near "# Note that you also have to add ""
[Fri Feb  9 12:03:03 2001] search.pl:   (Might be a runaway multi-line ""
string
 starting on line 41)
[Fri Feb  9 12:03:03 2001] search.pl:   (Missing semicolon on previous
line?)
syntax error at search.pl line 43, near "# Note that you also have to add ""
In string, @ISA now must be written as \@ISA at search.pl line 43, near
"$db_pac
kage = 'DB_File';
package AnyDBM_File;
@ISA"
In string, @force now must be written as \@force at search.pl line 43, near
"$!"
;

my (@force"
In string, @not now must be written as \@not at search.pl line 43, near
"@force,
 @not"
In string, @other now must be written as \@other at search.pl line 43, near
"@no
t, @other"
In string, @docs now must be written as \@docs at search.pl line 43, near
"@othe
r);
my (@docs"
In string, @valid_docs now must be written as \@valid_docs at search.pl line
43,
 near "@docs, @valid_docs"
In string, @term_ids now must be written as \@term_ids at search.pl line 43,
nea
r "$html;
}

sub answer_query {
  my @term_ids"
[Fri Feb  9 12:03:03 2001] search.pl: search.pl had compilation errors.




------=_NextPart_000_0000_01C09291.C4DE2560
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D328300612-09022001><FONT face=3D"MS Sans Serif"=20
size=3D2>Hi,</FONT></SPAN></DIV>
<DIV><SPAN class=3D328300612-09022001><FONT face=3D"MS Sans Serif"=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D328300612-09022001><FONT face=3D"MS Sans Serif" =
size=3D2>I am=20
trying to setup perlfect search on a local web =
server.</FONT></SPAN></DIV>
<DIV><SPAN class=3D328300612-09022001><FONT face=3D"MS Sans Serif"=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D328300612-09022001><FONT face=3D"MS Sans Serif" =
size=3D2>I have=20
indexed my test web site (MS Personal web server on NT Wkstn). All=20
ok.</FONT></SPAN></DIV>
<DIV><SPAN class=3D328300612-09022001><FONT face=3D"MS Sans Serif" =
size=3D2>I have=20
modified&nbsp;3 lines of search.pl following the advice of the in-file=20
comments:</FONT></SPAN></DIV>
<DIV><SPAN class=3D328300612-09022001><FONT face=3D"MS Sans Serif"=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D328300612-09022001><FONT face=3D"MS Sans Serif"=20
size=3D2>&lt;snippet from searcg.pl&gt;</FONT></SPAN></DIV>
<DIV><SPAN class=3D328300612-09022001><FONT face=3D"MS Sans Serif"=20
size=3D2>......</FONT></SPAN></DIV>
<DIV><SPAN class=3D328300612-09022001><FONT face=3D"MS Sans Serif"=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D328300612-09022001><FONT face=3D"MS Sans Serif" =
size=3D2># If=20
you're using Windows NT you might need to comment in the next two =
lines<BR># and=20
remove 'use Perlfect::Template;' below. Instead of foobar use the =
same<BR>#=20
value that you're using for $INSTALL_DIR in conf.pl.<BR>&nbsp;push(@INC, =

"e:\webroot\cgi\perlfect\search\");<BR>&nbsp;require =
Perlfect::Template;<BR>#=20
use Perlfect::Template;</FONT></SPAN></DIV>
<DIV><SPAN class=3D328300612-09022001><FONT face=3D"MS Sans Serif"=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D328300612-09022001><FONT face=3D"MS Sans Serif"=20
size=3D2>......</FONT></SPAN></DIV>
<DIV><SPAN class=3D328300612-09022001><FONT face=3D"MS Sans Serif"=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D328300612-09022001><FONT face=3D"MS Sans Serif" =
size=3D2>In it's=20
orignal state, a syntax check (ie: perl -c search.pl) returns all=20
ok</FONT></SPAN></DIV>
<DIV><SPAN class=3D328300612-09022001><FONT face=3D"MS Sans Serif"=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D328300612-09022001><FONT face=3D"MS Sans Serif" =
size=3D2>With the=20
lines&nbsp;altered as above I get the errors listed =
below.</FONT></SPAN></DIV>
<DIV><SPAN class=3D328300612-09022001><FONT face=3D"MS Sans Serif"=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D328300612-09022001><FONT face=3D"MS Sans Serif" =
size=3D2>Can anyone=20
help?</FONT></SPAN></DIV>
<DIV><SPAN class=3D328300612-09022001><FONT face=3D"MS Sans Serif"=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D328300612-09022001><FONT face=3D"MS Sans Serif"=20
size=3D2>TIA</FONT></SPAN></DIV>
<DIV><SPAN class=3D328300612-09022001><FONT face=3D"MS Sans Serif"=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D328300612-09022001><FONT face=3D"MS Sans Serif" =
size=3D2>Ian=20
Kennedy</FONT></SPAN></DIV>
<DIV><SPAN class=3D328300612-09022001><FONT face=3D"MS Sans Serif" =
size=3D2><A=20
href=3D"mailto:Ian.kennedy@systemc.com">Ian.kennedy@systemc.com</A></FONT=
></SPAN></DIV>
<DIV><SPAN class=3D328300612-09022001><FONT face=3D"MS Sans Serif"=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D328300612-09022001><FONT face=3D"MS Sans Serif" =
size=3D2>Errors=20
below</FONT></SPAN></DIV>
<DIV><SPAN class=3D328300612-09022001><FONT face=3D"MS Sans Serif"=20
size=3D2>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</FONT></SPAN></DIV>
<DIV><SPAN class=3D328300612-09022001><FONT face=3D"MS Sans Serif"=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D328300612-09022001><FONT face=3D"MS Sans Serif"=20
size=3D2>E:\WebRoot\cgi\perlfect\search&gt;perl -c search.pl &gt;=20
f:\temp\p.txt<BR>[Fri Feb&nbsp; 9 12:03:03 2001] search.pl: String found =
where=20
operator expected at se<BR>arch.pl line 43, near "# Note that you also =
have to=20
add ""<BR>[Fri Feb&nbsp; 9 12:03:03 2001] search.pl:&nbsp;&nbsp; (Might =
be a=20
runaway multi-line "" string<BR>&nbsp;starting on line 41)<BR>[Fri =
Feb&nbsp; 9=20
12:03:03 2001] search.pl:&nbsp;&nbsp; (Missing semicolon on previous=20
line?)<BR>syntax error at search.pl line 43, near "# Note that you also =
have to=20
add ""<BR>In string, @ISA now must be written as \@ISA at search.pl line =
43,=20
near "$db_pac<BR>kage =3D 'DB_File';<BR>package =
AnyDBM_File;<BR>@ISA"<BR>In=20
string, @force now must be written as \@force at search.pl line 43, near =

"$!"<BR>;</FONT></SPAN></DIV>
<DIV><FONT face=3D"MS Sans Serif" size=3D2></FONT>&nbsp;</DIV>
<DIV><SPAN class=3D328300612-09022001><FONT face=3D"MS Sans Serif" =
size=3D2>my=20
(@force"<BR>In string, @not now must be written as \@not at search.pl =
line 43,=20
near "@force,<BR>&nbsp;@not"<BR>In string, @other now must be written as =
\@other=20
at search.pl line 43, near "@no<BR>t, @other"<BR>In string, @docs now =
must be=20
written as \@docs at search.pl line 43, near "@othe<BR>r);<BR>my =
(@docs"<BR>In=20
string, @valid_docs now must be written as \@valid_docs at search.pl =
line=20
43,<BR>&nbsp;near "@docs, @valid_docs"<BR>In string, @term_ids now must =
be=20
written as \@term_ids at search.pl line 43, nea<BR>r=20
"$html;<BR>}</FONT></SPAN></DIV>
<DIV><FONT face=3D"MS Sans Serif" size=3D2></FONT>&nbsp;</DIV>
<DIV><SPAN class=3D328300612-09022001><FONT face=3D"MS Sans Serif" =
size=3D2>sub=20
answer_query {<BR>&nbsp; my @term_ids"<BR>[Fri Feb&nbsp; 9 12:03:03 =
2001]=20
search.pl: search.pl had compilation errors.</FONT></SPAN></DIV>
<DIV class=3DSection1>
<P class=3DMsoNormal><FONT face=3D"MS Sans Serif" =
size=3D2></FONT>&nbsp;</P></DIV>
<DIV><FONT face=3D"MS Sans Serif" =
size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0000_01C09291.C4DE2560--