error of "use lib qw(...) ;"?

error of "use lib qw(...) ;"?

am 07.08.2003 04:30:51 von Xu.Qiang

Hi, all:

My perl script is as follows (I name it as "intro4.pl"):

#!d:/perl/bin/perl -w
# select-user.pl - use current user's option file to connect
use strict;
use CGI qw(:standard);
use lib qw(/apachee-lib/perl);
use WebDB;
my($dbh, $user);
#$dbh = WebDB::connect();
$dbh = WebDB::connect_with_option_file();
$user = $dbh->selectrow_array ("SELECT USER()");
print header(), start_html("Select User");
print p("You connected as $user\n");
print end_html();
$dbh->disconnect();
exit(0);


I have put the package WebDB.pm into the folder D:\Apache
Group\Apache\htdocs\apachee-lib\perl\, where my Apache server root is
D:\Apache Group\Apache\htdocs\.


But I always get the following error when running this script through web:

[Wed Aug 06 18:41:11 2003] [error] [client 12.345.67.890] Premature end of
script headers: d:/apache group/apache/cgi-bin/mysql/intro4.pl
[Wed Aug 06 18:41:11 2003] [error] [client 12.345.67.890] Can't locate
WebDB.pm in @INC (@INC contains: /apachee-lib/perl/ d:/Perl/lib
d:/Perl/site/lib .) at d:\APACHE~1\apache\cgi-bin\mysql\intro4.pl line 7.

[Wed Aug 06 18:41:11 2003] [error] [client 12.345.67.890] BEGIN
failed--compilation aborted at d:\APACHE~1\apache\cgi-bin\mysql\intro4.pl
line 7.

Why it still can't find the package WebDB.pm, although I have set the
searching path for that package?


any suggestion is welcome,

thanks,

Regards,
Xu Qiang

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org