hanks for your answer.
Shlomo
-Original Message-
From: Michael Fowler [mailto:michael@;shoebox.net]
Sent: Thursday, October 17, 2002 11:59 PM
To: Reinstein, Shlomo
Cc: '[EMAIL PROTECTED]'
Subject: Re: How to use a module located relative to the current script
On Wed, Oct 16,
Shlomo Reinstein wrote:
> Hi,
> From some perl script, say "some_path/lib/sos.pl", I would like to make
> use of a perl module, which is located at "some_path/modules". I don't
> know what "some_path" is inside "sos.pl", but I know that I can reach the
> module using a relative path "../modules".
On Wed, Oct 16, 2002 at 05:05:09PM +0200, Reinstein, Shlomo wrote:
> Is there a way that I can say in "sos.pl" that I want to use the module
> located in "../modules" relative to it?
I've read through this thread and it sounds like you're trying to solve the
wrong problem, or perhaps going at it t
[EMAIL PROTECTED]
> Subject: RE: How to use a module located relative to the
> current script
>
>
> Thanks. But how can I use the solution below in order to use
> a module? Keep in mind that when I type:
> use SomeModule;
> The "use" statement is executed
07 PM
To: Reinstein, Shlomo; [EMAIL PROTECTED]
Subject: RE: How to use a module located relative to the current script
From: "Reinstein, Shlomo" <[EMAIL PROTECTED]>
> Thanks. However, I think this module won't help me. You see,
> "some_path/lib/sos.
How do I use Path::To::Module if I don't know Path?
-Original Message-
From: James Edward Gray II [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 16, 2002 5:54 PM
To: Reinstein, Shlomo
Cc: '[EMAIL PROTECTED]'
Subject: Re: How to use a module located relative to the
filepath";
}else{print "cant locate file $file_to_search";
}
- Original Message -
From: "Jenda Krynicky" <[EMAIL PROTECTED]>
To: "Reinstein, Shlomo" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, October 17,
From: "Reinstein, Shlomo" <[EMAIL PROTECTED]>
> Thanks. However, I think this module won't help me. You see,
> "some_path/lib/sos.pl" is not the "original" (bin) script, but rather
> it's a library of routines used by many "original" scripts. That is to
> say, users don't run "pe
s.pl", but rather they run some other script
which knows how to locate and require sos.pl.
Shlomo
-Original Message-
From: NYIMI Jose (BMB) [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 16, 2002 6:10 PM
To: Reinstein, Shlomo; [EMAIL PROTECTED]
Subject: RE: How to use a module loca
I stand corrected. My apologies.
James
On Wednesday, October 16, 2002, at 11:10 AM, Jenda Krynicky wrote:
> From: James Edward Gray II <[EMAIL PROTECTED]>
>
>> use Path::To::Module;
>
> Beg::Your::Pardon?
>
> 1) this will not help him. This'll cause perl to search for Module.pm
> in all Path/
up "some_path" from $Bin
my ($some_path)=$Bin=~/(\S+)\/lib/;
#then use lib
use lib ("$some_path/modules");
HTH,
José.
> -Original Message-
> From: Reinstein, Shlomo [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 16, 2002 5:05 PM
> To: '
From: James Edward Gray II <[EMAIL PROTECTED]>
> use Path::To::Module;
Beg::Your::Pardon?
1) this will not help him. This'll cause perl to search for Module.pm
in all Path/To subdirectories of directories in @INC. But he needs to
add something to @INC.
2) If you do this the module will most
up "some_path" from $Bin
my ($some_path)=$Bin=~/(\S+)\/lib/;
#then use lib
use lib ("$some_path/modules");
HTH,
José.
> -Original Message-
> From: Reinstein, Shlomo [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 16, 2002 5:05 PM
> To: '[EMAIL PR
use Path::To::Module;
On Wednesday, October 16, 2002, at 10:05 AM, Reinstein, Shlomo wrote:
> Hi,
> From some perl script, say "some_path/lib/sos.pl", I would like to
> make use
> of a perl module, which is located at "some_path/modules". I don't
> know what
> "some_path" is inside "sos.pl",
Hi,
>From some perl script, say "some_path/lib/sos.pl", I would like to make use
of a perl module, which is located at "some_path/modules". I don't know what
"some_path" is inside "sos.pl", but I know that I can reach the module using
a relative path "../modules". The problem is, writing "use lib
15 matches
Mail list logo