CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
use modules?

 



mike_robb
Novice

Apr 2, 2001, 7:56 PM

Post #1 of 2 (340 views)
use modules? Can't Post

how would one use modules without having to specify the full path to look for the modules in?

does the path have to be specified (INC) from the /home/ directory all the way to the modules? or can it be relative to the perl program?

TIA




sleuth
Enthusiast / Moderator

Apr 3, 2001, 11:40 PM

Post #2 of 2 (331 views)
Re: use modules? [In reply to] Can't Post

I wish, unfortunately unless you install the module and use it like you would use LWP::Simple; the closest you can get to shortening your path is having the module in the same directory as your script and require "file.pm"; would get it.

That's unless you've got a server config keeping you using full paths.

Also on some servers, you can use relative paths,

require "../file.pm";

Most server administrators take off the ability to use relative pathways though, rumor has it that relative paths are slower, I agree.

So sorry Mike,

Tony


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives