Connecting Tech Pros Worldwide Help | Site Map

Library path question

  #1  
Old April 21st, 2006, 03:05 PM
Julie Warden
Guest
 
Posts: n/a
Group,

I'm setting up Perl 5.8 on a Sun solaris 5.6 machine and have a question
about the $PATH variable.

My installation is in /usr/local with subdirs:
perl is in bin
libraries are in lib/perl5

lib/perl5 has 4 subdirs and these have subdirs, and some of these have
subdirs. In all I have about 1200 modules in more than 20 directories.

Do I have to include all these directories in my path for perl to find
them? Is there a $LIB var for perl like with C? Will perl parse dir trees
for modules?

If it isn't obvious, I have about 3 days experience with perl, so be
gentle.

Any help appreciated,
Julie
  #2  
Old April 21st, 2006, 03:15 PM
Aukjan van Belkum
Guest
 
Posts: n/a

re: Library path question


Well there is the $PERL5LIB variable which you can set in your
environment, but Perl has its own internal library path which you can
manipulate in your scripts: @INC. From your script you can add to this
array by using the command: 'use lib '<path to modules>'

You can see which paths it traverses by doing:

perl -e 'join "\n", @INC'

Hope this gets you going..

-- Aukjan

Julie Warden wrote:[color=blue]
> Group,
>
> I'm setting up Perl 5.8 on a Sun solaris 5.6 machine and have a question
> about the $PATH variable.
>
> My installation is in /usr/local with subdirs:
> perl is in bin
> libraries are in lib/perl5
>
> lib/perl5 has 4 subdirs and these have subdirs, and some of these have
> subdirs. In all I have about 1200 modules in more than 20 directories.
>
> Do I have to include all these directories in my path for perl to find
> them? Is there a $LIB var for perl like with C? Will perl parse dir trees
> for modules?
>
> If it isn't obvious, I have about 3 days experience with perl, so be
> gentle.
>
> Any help appreciated,
> Julie[/color]
  #3  
Old April 21st, 2006, 07:25 PM
Julie Warden
Guest
 
Posts: n/a

re: Library path question


Aukjan van Belkum <aukjan@gmail.com> wrote in
news:2cfac$4448e6d7$c2abfc64$11435@news2.tudelft.n l:
[color=blue]
> Well there is the $PERL5LIB variable which you can set in your
> environment, but Perl has its own internal library path which you can
> manipulate in your scripts: @INC. From your script you can add to this
> array by using the command: 'use lib '<path to modules>'
>
> You can see which paths it traverses by doing:
>
> perl -e 'join "\n", @INC'
>
> Hope this gets you going..
>
> -- Aukjan
>
> Julie Warden wrote:[color=green]
>> Group,
>>
>> I'm setting up Perl 5.8 on a Sun solaris 5.6 machine and have a
>> question about the $PATH variable.
>>
>> My installation is in /usr/local with subdirs:
>> perl is in bin
>> libraries are in lib/perl5
>>
>> lib/perl5 has 4 subdirs and these have subdirs, and some of these
>> have subdirs. In all I have about 1200 modules in more than 20
>> directories.
>>
>> Do I have to include all these directories in my path for perl to
>> find them? Is there a $LIB var for perl like with C? Will perl parse
>> dir trees for modules?
>>
>> If it isn't obvious, I have about 3 days experience with perl, so be
>> gentle.
>>
>> Any help appreciated,
>> Julie[/color][/color]

Aukjan,

Thanks! I also got some good info at the SunFreeWare site. This is a
good tip, and I'm anxious to use it.

Julie
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Include path question Jan Engelhardt answers 26 November 20th, 2006 07:25 AM
VBC path question David answers 0 November 18th, 2005 04:46 PM
Graphics 2D path question Damien Sawyer answers 4 November 16th, 2005 08:34 AM
py2exe windows apps path question Grant Edwards answers 9 August 2nd, 2005 09:15 PM