At 01:44 PM 1/12/2006 -0800, Lyle Kopnicky wrote:
>If I put a relative path in @INC, I guess it would be relative to the 
>current directory.  Which is whatever the directory the console is in 
>when it runs the script.  Not very useful for finding modules.  Instead 
>I want to find a path relative to where the script is located.  
>(Actually, I'm interested in finding the parent directory of the one 
>where the script is located.)  As far as I can tell, there is no 
>function that tells me that.  That is why I have to calculate it.

The current directory is automatically in @INC.  If the script and module
are in the same dir then u have to do nothing.  If the the path is always
something known reletive to the current dir u can try use lib "../dir"; or
first find the current dir with use Cwd; and then chopping off the last dir
component and putting the result into @INC.

>What is the most common way that people handle this?  That is, say your 
>modules are in the same folder as the main script.  (Which I would think 

. is always in @INC.




--
REMEMBER THE WORLD TRADE CENTER         ---=< WTC 911 >=--
"...ne cede malis"

00000100

_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to