Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

overriding perl modules

Status
Not open for further replies.

calabama

Programmer
Feb 19, 2001
180
US
Hello,

Currently my script has a
Code:
use GD;
line at the begining.
I thought that this invokes the GD module residing in the MAIN perl app on the server.

I want to use the GD module that is loaded locally to my script within my cgi-local directory not the servers cgi-bin.

How do I do this?

Thanks In the begining
Let us first assume that there was nothing to begin with.
 
Hi calabama,

You can change where Perl looks for modules by placing this statement before the 'use GD' line:

Code:
use lib '/dir/to/cgi-bin';

[hth] Notorious P.I.G.
 
Is this a full pathname? In the begining
Let us first assume that there was nothing to begin with.
 
I've never actually used it, but according to what I've read it 'shouldn't' be a relative pathname.

Quote from the fuzzy-llama [Learning Perl: O'Reilly]:
Be sure to use a nonrelative pathname as the argument, since there's no telling what will be the current working directory when your program is run. This is especially important for CGI programs [...] Notorious P.I.G.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top