Re: modifying @INC permanently

2006-06-08 Thread Anthony Ettinger
On 6/8/06, Chad Perrin <[EMAIL PROTECTED]> wrote: > Yes. Recompile Perl setting the appropriate compile-time flags. More > importantly, though: Why? It is just easier to install your modules > in the standardly defined place for site-specific modules. By install do you mean cp myMod.pm to /

Re: modifying @INC permanently

2006-06-08 Thread Anthony Ettinger
You do not need logic to do that. It would seem better to use: use lib '/path/to/my/misplaced/perl-modules'; The point is to not have to specify a local path at all: use lib qw(/path); push(@inc, '/path'); Each script tests for OS: linux/sunos, and win32, and pushes the path to @INC ac

Re: modifying @INC permanently

2006-06-08 Thread Chad Perrin
On Thu, Jun 08, 2006 at 01:59:46PM -0700, Lawrence Statton wrote: > > Is there a way to modify @INC for the perl installation as a whole? > > Yes. Recompile Perl setting the appropriate compile-time flags. More > importantly, though: Why? It is just easier to install your modules > in the stand

Re: modifying @INC permanently

2006-06-08 Thread Lawrence Statton
> Is there a way to modify @INC for the perl installation as a whole? Yes. Recompile Perl setting the appropriate compile-time flags. More importantly, though: Why? It is just easier to install your modules in the standardly defined place for site-specific modules. > > All my scripts have log

RE: modifying @INC permanently

2006-06-08 Thread Timothy Johnson
Win32 changes to the environment from within your script won't be permanent, so that won't work unless you do the system call that sets the environment variable permanently (and also the local one, because it won't reflect the changes to the system call until it is invoked again). Do you have the

Re: Modifying @INC

2004-07-29 Thread Joshua Colson
On Wed, 2004-07-28 at 22:14, PerlDiscuss - Perl Newsgroups and mailing lists wrote: > I want to add some paths to the @INC array to resolve certain package > names at runtime. > > One of the methods is: "push(@INC,$path) or unshift($path,@INC)" and then > say "require package_name;". > the problem

RE: Modifying @INC

2004-07-29 Thread kamal.gupta
regards, R. Kamal Raj Guptha. -Original Message- From: Randy W. Sims [mailto:[EMAIL PROTECTED] Sent: Thursday, July 29, 2004 3:48 PM To: R. Kamal Raj Guptha (WT01 - TELECOM & INTER-NETWORKING SOLUTIONS) Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: Modifying @INC [EMAIL PROTECTED] wrote

RE: Modifying @INC

2004-07-29 Thread Bob Showalter
[EMAIL PROTECTED] wrote: > I want to add some paths to the @INC array to resolve certain package > names at runtime. > > One of the methods is: "push(@INC,$path) or unshift($path,@INC)" and > then say "require package_name;". > the problem with this is that we still need to use the "::" operator >

Re: Modifying @INC

2004-07-29 Thread Randy W. Sims
[EMAIL PROTECTED] wrote: This is one way of doing it. Probably there could be some other short and sweet ways of doing it. I'm also waiting for such an answer. push( @INC, $path ); require package_name; package_name->import(); # pulls in exported symbols -Original Message- From: PerlDiscus

Re: Modifying @INC

2004-07-29 Thread Prasanna Kothari
try this "use lib "; PerlDiscuss - Perl Newsgroups and mailing lists wrote: I want to add some paths to the @INC array to resolve certain package names at runtime. One of the methods is: "push(@INC,$path) or unshift($path,@INC)" and then say "require package_name;". the problem with this is that we

RE: Modifying @INC

2004-07-29 Thread kamal.gupta
Hi shahj, Instead of "require package_name" you may say use package_name. As 'require' is not bringing in the symbols. Only 'use' does it. You should always use 'use' when you wanted to bring in the symbols inside your script from the package. More importantly the package 'package_name' should