> "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
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
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
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
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
> "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
> "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
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
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:
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
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
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
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
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'
> 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
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
16 matches
Mail list logo