From:                   David Rainsford <[EMAIL PROTECTED]>
> I am trying to run GreyMatter on my Mac OSX machine.  However, I get
> the following error:
> 
> Can't locate gm-library.cgi in @INC (@INC contains:
> /System/Library/Perl/darwin /System/Library/Perl /Library/Perl/darwin
> /Library/Perl /Library/Perl /Network/Library/Perl/darwin
> /Network/Library/Perl /Network/Library/Perl) at gm.cgi line 21.
> 
> 
> gm-library.cgi is located in the same directory as the script I am
> trying to run - I assume '.' should also be in @INC - where can I
> change this?

1) The error doesn't mention . 
So aparently current directory is not searched.
You may add it with
        use lib '.';
I do not recommend this though.

2) The current directory is NOT guaranteed to be the directory where 
the script is stored. Use
        use FindBin qw($Bin);
to find you what the directory is and
        use lib $Bin;
to add it to @INC.
I do not recommend this.

3) It's not the best idea to store the libraries in the same 
directory as the CGI scripts.
Create a separate directory inaccessible via Web for the libraries 
and add THAT directory to @INC.

Eg. if your scripts are in
        /home/david/cgi
store the libraries in
        /home/david/perl-lib
and add either
        use lib '/home/david/perl-lib';
or
        use FindBin qw($Bin);
        use lib $Bin.'/../perl-lib';

HTH, Jenda

===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to