Click here to get back home

use lib relative pathnames - redux

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
use lib relative pathnames - redux Tookelso 12-08-2005
Get Chitika Premium
Posted by Tookelso on December 8, 2005, 3:49 pm
Please log in for more thread options


Hello,

I'm trying to use libraries that are relative to the perl module or
script that's being called.

The below code will not work
use lib '../lib'
if I execute the script from a different drive letter, or from a
different directory in Windows.

I found this thread from 8 years ago: http://tinyurl.com/drsoh

Some people were going to use the following code:

use lib File::Basename::dirname(__FILE__) . "../lib";

Is there a more up to date solution?

Thanks,
--Nate



Posted by John Bokma on December 9, 2005, 12:24 am
Please log in for more thread options


Tookelso@yahoo.com wrote:

> Hello,
>
> I'm trying to use libraries that are relative to the perl module or
> script that's being called.
>
> The below code will not work
> use lib '../lib'
> if I execute the script from a different drive letter, or from a
> different directory in Windows.
>
> I found this thread from 8 years ago: http://tinyurl.com/drsoh
>
> Some people were going to use the following code:
>
> use lib File::Basename::dirname(__FILE__) . "../lib";
>
> Is there a more up to date solution?

Don't know about up to date, but I used this one in the past:
http://search.cpan.org/~nwclark/perl-5.8.7/lib/FindBin.pm


--
John Small Perl scripts: http://johnbokma.com/perl/
Perl programmer available: http://castleamber.com/
I ploink googlegroups.com :-)



Similar ThreadsPosted
Entering pathnames in a CGI.pm field January 28, 2005, 12:30 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap