Re: use lib relative pathnames - redux



Tookelso@xxxxxxxxx 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 :-)

.



Relevant Pages

  • Re: IP video camera (wireless)
    ... thepixelfreak wrote: ... Personally I run a custom Perl script that uses the LWP::UserAgent Perl module to grab images from various wireless IP cameras around my house, and that same script uses a Unix tool called "motiontrack" to compare two sequential images from each camera to determine if there is motion. ...
    (comp.sys.mac.system)
  • Re: Cannot reset LIBPATH in perl program on AIX
    ... >> I am having a problem with my perl module on AIX system. ... We store information of our source code in a seperate database and have ... > want and the exec your perl script. ...
    (comp.lang.perl.misc)
  • Cannot reset LIBPATH in perl program on AIX
    ... I am having a problem with my perl module on AIX system. ... When functions from my perl module are called I would like to reset LIBPATH ... I ran the script in perl debugger and I can see that the values have ...
    (comp.lang.perl.misc)
  • Re: Cant locate loadable object for module
    ... Can't locate loadable object for module ... > I'm trying to use a perl module that a tool I got, ccmeter.pl, ... > requiresand I can't no matter what I do.. ... > When I run the script it complains it "Can't locate loadable ...
    (perl.beginners)
  • control xmms from shell?
    ... xmms-shell has a mildly retarded configure script and xmmsctrl has none... ... the only thing that i've found so far is a perl module, ... any ideas how to control xmms from a terminal? ... then control it instead of the cd player... ...
    (comp.unix.bsd.freebsd.misc)