Re: Re[6]: Finding @INC

2001-06-28 Thread Randal L. Schwartz
> "Maxim" == Maxim Berlin <[EMAIL PROTECTED]> writes: Maxim> Randal, thank you for your patience and examples, but please do not Maxim> explain how BEGIN works again. I know that. No, you don't. I'll stop here, I'm apparently beating my head against your brick wall. And judging from the ot

Re: Finding @INC

2001-06-28 Thread Michael Fowler
On Fri, Jun 29, 2001 at 02:24:56AM +0400, Maxim Berlin wrote: > Thursday, June 28, 2001, Randal L. Schwartz <[EMAIL PROTECTED]> wrote: > > RLS> NO NO. That doesn't work. All of those unshifts are executed REGARDLESS > RLS> of the $OS type. > [...] > Randal, thank you for your patience and examp

Re[6]: Finding @INC

2001-06-28 Thread Peter Scott
At 02:24 AM 6/29/01 +0400, Maxim Berlin wrote: >Thursday, June 28, 2001, Randal L. Schwartz <[EMAIL PROTECTED]> wrote: > >RLS> NO NO. That doesn't work. All of those unshifts are executed REGARDLESS >RLS> of the $OS type. >[...] >Randal, thank you for your patience and examples, but please do no

Re[6]: Finding @INC

2001-06-28 Thread Maxim Berlin
Hello Randal, Thursday, June 28, 2001, Randal L. Schwartz <[EMAIL PROTECTED]> wrote: RLS> NO NO. That doesn't work. All of those unshifts are executed REGARDLESS RLS> of the $OS type. [...] Randal, thank you for your patience and examples, but please do not explain how BEGIN works again. I kn

Re[4]: Finding @INC

2001-06-28 Thread Maxim Berlin
Hello Randal, Wednesday, June 27, 2001, Randal L. Schwartz <[EMAIL PROTECTED]> wrote: HT>> The BEGIN blocks always execute first no matter where you put them. Maxim>> yes, of course. BEGIN was placed inside just for better readability. RLS> I actually consider that *less* readable and maintaina

Re: Re[2]: Finding @INC

2001-06-27 Thread Randal L. Schwartz
> "Maxim" == Maxim Berlin <[EMAIL PROTECTED]> writes: Maxim> for my configs, i don't need (and don't have) Maxim> $dir/$archname/auto directories, so i still use >>> BEGIN { unshift(@INC,"/usr/local/etc"); } Maxim> am i wrong? You are typing too much. In a code review, I'd flag that as a

Re: Re[2]: Finding @INC

2001-06-27 Thread Randal L. Schwartz
> "Maxim" == Maxim Berlin <[EMAIL PROTECTED]> writes: Maxim> Hello Tamir, Maxim> Wednesday, June 27, 2001, Hasanuddin Tamir <[EMAIL PROTECTED]> wrote: >>> if ( $OS ne "NT" ) >>> { >>> BEGIN { unshift(@INC,"/usr/local/etc"); } >>> require "config.backup.pl"; >>> } HT> The BEGIN blocks always

Re: Finding @INC

2001-06-27 Thread Jos Boumans
because push @INC is a runtime statement, use lib is a compile time statement meaning you'll be alerted if the dir doesnt exist, or something else goes wrong at the moment you start your script, rather then it dying half way when not findin a file. hth Jos Boumans Maxim Berlin wrote: > Hello

Re[2]: Finding @INC

2001-06-27 Thread Maxim Berlin
Hello Jos, Wednesday, June 27, 2001, Jos Boumans <[EMAIL PROTECTED]> wrote: JB> Please use the the 'use lib' pragma, rather then fiddling with @INC JB> concider: JB> use lib (../foo); JB> rather than: JB> BEGIN: { push @INC, '../foo' } JB> perldoc lib for more info according to perldoc lib:

Re[2]: Finding @INC

2001-06-27 Thread Maxim Berlin
Hello Tamir, Wednesday, June 27, 2001, Hasanuddin Tamir <[EMAIL PROTECTED]> wrote: >> if ( $OS ne "NT" ) >> { >> BEGIN { unshift(@INC,"/usr/local/etc"); } >> require "config.backup.pl"; >> } HT> The BEGIN blocks always execute first no matter where you put them. yes, of course. BEGIN was pl

Re: Finding @INC

2001-06-27 Thread Jos Boumans
Please use the the 'use lib' pragma, rather then fiddling with @INC concider: use lib (../foo); rather than: BEGIN: { push @INC, '../foo' } perldoc lib for more info hth Jos Boumans Maxim Berlin wrote: > Hello Dennis, > > Tuesday, June 26, 2001, Dennis Fox <[EMAIL PROTECTED]> wrote: > > DF

Re: Finding @INC

2001-06-27 Thread Hasanuddin Tamir
On Wed, 27 Jun 2001, Maxim Berlin <[EMAIL PROTECTED]> wrote, > Hello Dennis, > > Tuesday, June 26, 2001, Dennis Fox <[EMAIL PROTECTED]> wrote: > > DF> My difficulty is that I don't understand how to modify @INC to > DF> include the non-standard locations, so that I don't have to have the

Re: Finding @INC

2001-06-27 Thread Maxim Berlin
Hello Dennis, Tuesday, June 26, 2001, Dennis Fox <[EMAIL PROTECTED]> wrote: DF> My difficulty is that I don't understand how to modify @INC to DF> include the non-standard locations, so that I don't have to have the user DF> supply commandline arguments each time the script is needed. e

Re: Finding @INC

2001-06-26 Thread Michael Fowler
On Tue, Jun 26, 2001 at 09:44:13AM -0500, Dennis Fox wrote: > My difficulty is that I don't understand how to modify @INC to > include the non-standard locations, so that I don't have to have the user > supply commandline arguments each time the script is needed. perldoc -q 'my own module'

RE: Finding @INC

2001-06-26 Thread Peter Cornelius
> My difficulty is that I don't understand how to modify @INC to > include the non-standard locations, so that I don't have to > have the user > supply commandline arguments each time the script is needed. You want the 'use lib "/non/statdard/lib";' directive. You can get more in

Finding @INC

2001-06-26 Thread Dennis Fox
Greetings all, I am doing work on a system where custom Perl Modules have been installed in at least two non-standard places -- no, not by me ;-). Since the primary application on this system is to be replicated on several other boxes, I am trying to write a script that will find and iden