Can someone tell me? Or where I can find a FAQ or tutorial on this?
Jun 12, 1999, 9:05 AM
Novice (23 posts)
Jun 12, 1999, 9:05 AM
Post #3 of 3
Views: 3464
Hi!
I didn't test this solution, since I have root access to my server, but I think it's gonna work.
1- Create a directory "modules" in your server.
2- Install the module like this:
% make
% make test
% make install
3- On the perl script that require the module put this line in the begin of script:
Once again, I didn't test this solution. I don't know for sure it's gonna work. In number 3, check the modules directory. You may need to use:
/path/to/modules/site_perl);
Another way is to like Alex did in Links2. After steps 1 and 2 go to the "modules" directory and copy the module to same directory you want to run the cgi script and add the following line to your script:
($0 =~ m,(.*)/[^/]+,) && unshift (@INC, "$1"); # Get the script location: UNIX /
($0 =~ m,(.*)\\[^\\]+,) && unshift (@INC, "$1"); # Get the script location: Windows \
};
if ($@) {
print "Content-type: text/plain\n\n";
print "Error including libraries: $@\n";
print "Make sure they exist, permissions are set properly, and paths are set correctly.";
exit;
}
------------------
Rogerio Morais
www.rogerle.com
[This message has been edited by Roger (edited June 12, 1999).]
I didn't test this solution, since I have root access to my server, but I think it's gonna work.
1- Create a directory "modules" in your server.
2- Install the module like this:
Code:
% perl5 Makefile.PL PREFIX=/path/to/modules % make
% make test
% make install
3- On the perl script that require the module put this line in the begin of script:
Code:
use lib qw(/path/to/modules);Once again, I didn't test this solution. I don't know for sure it's gonna work. In number 3, check the modules directory. You may need to use:
Code:
use lib qw(/path/to/modules /path/to/modules/site_perl);
Another way is to like Alex did in Links2. After steps 1 and 2 go to the "modules" directory and copy the module to same directory you want to run the cgi script and add the following line to your script:
Code:
eval { ($0 =~ m,(.*)/[^/]+,) && unshift (@INC, "$1"); # Get the script location: UNIX /
($0 =~ m,(.*)\\[^\\]+,) && unshift (@INC, "$1"); # Get the script location: Windows \
};
if ($@) {
print "Content-type: text/plain\n\n";
print "Error including libraries: $@\n";
print "Make sure they exist, permissions are set properly, and paths are set correctly.";
exit;
}
------------------
Rogerio Morais
www.rogerle.com
[This message has been edited by Roger (edited June 12, 1999).]