Forum Moderators: coopster & phranque

Message Too Old, No Replies

Not understanding error message Perl

         

txbakers

7:06 am on Dec 8, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm trying to install a Perl script. There is a require 'cgi-lib2.pl' line. The cgi-lib2.pl file is in the same cgibin as the .cgi file calling it, yet I get this error:

Can't locate cgi-lib2.pl in @INC (@INC contains: D:/Perl/lib D:/Perl/site/lib .) at E:\actuatesource\cgi-bin\uploader.cgi line 33.

Can someone tell me what this means and how to fix?

Thanks.

littleman

7:18 am on Dec 8, 2001 (gmt 0)



Okay, you are having a path error. This is happening because you are on a MS machine and you are setting paths like you are on a *nix machine.

Somewhere you have a path to cgi-lib2.pl setup wrong. Look for it and switch it to a windows path format. Also, put the full path if it is in the script relatively. Windows requires paths to look like this:

E:\\actuatesource\\cgi-bin\\cgi-lib2.pl

If 'cgi-lib2.pl' is in the same folder as 'cgi-lib2.pl' than that will be the path you'll have to set.

Brett_Tabke

7:47 am on Dec 8, 2001 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Tx, is the Cgi-lib2.pl file part of a package you downloaded? Or it could be part of a module that you don't have installed.

Also, win perl does support unix fore slashes in paths. c:/www/foo/stuff.pl works.

littleman

7:57 am on Dec 8, 2001 (gmt 0)



>win perl does support unix for slashes in paths. c:/www/foo/stuff.pl works.

It does? Is this something new? It's been a while, but every time I set up a script on a windows server I've had to do the '\\' setup.

seriesint

5:31 pm on Dec 8, 2001 (gmt 0)



just add the directory to @INC in the script
at the top of the script before any require or use lines put
push (@INC, "E:/actuatesource/cgi-bin/");
if E:/actuatesource/cgi-bin/ is the location of the cgi-lib2.pl else
add the specific directory.

txbakers

12:23 am on Dec 9, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks all.

The single slash path does indeed work on NT and has for quite some time.

The cgi-lib2.pl file was included in the download and it was installed in the same directory as the pl file. The line in the pl file was
require: "cgi-lib2.pl". I did try it also with the absolute path to no avail.

I just kept looking for other pl files and found one that did work. I went through about a dozen downloads before finding one that worked.

One day I'll need to learn Perl myself.......

Brett_Tabke

10:05 am on Dec 9, 2001 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



I think since perl 4 Little. It sure makes it easy.