Re: Debugging and passing constant value at run time

2015-07-07 Thread Sharanbasappa Raghapur, ERS, HCLTech
Right. I almost forgot that one can use regular flags passed from command line for this, They are not constants but they serve my purpose. Regards, Sharan On Jul 7, 2015 10:19 PM, Charles DeRykus wrote: On Tue, 7 Jul 2015 11:40:35 + "Sharanbasappa Raghapur, ERS, HCLTech" wr

Re: Debugging and passing constant value at run time

2015-07-07 Thread Charles DeRykus
On Tue, 7 Jul 2015 11:40:35 + "Sharanbasappa Raghapur, ERS, HCLTech" wrote: > I am using constant mainly to enable printing of debugging messages > (e.g. use constant DEBUGGING_L1 => 0;) Normally, the value is '0' and > when I need to see debug messages, I make this 1 and run the script. > >

Re: Debugging and passing constant value at run time

2015-07-07 Thread Uri Guttman
On 07/07/2015 10:52 AM, Ron Bergin wrote: Which means that neither approach is perfect. I still prefer the variable over the constant. I have never done any benchmark tests to see if there is any significant performance difference. Have you? if you have a lot of debugging code, it can make

Re: Debugging and passing constant value at run time

2015-07-07 Thread Ron Bergin
g Cc: "Ron Bergin" Sent: Tuesday, July 7, 2015 7:41:34 AM Subject: Re: Debugging and passing constant value at run time On Tue, 7 Jul 2015 07:27:49 -0700 (PDT) Ron Bergin wrote: > Using a DEBUG constant and assigning its value via an environment > variable are both common, but has a

Re: Debugging and passing constant value at run time

2015-07-07 Thread Shawn H Corey
On Tue, 7 Jul 2015 07:27:49 -0700 (PDT) Ron Bergin wrote: > Using a DEBUG constant and assigning its value via an environment > variable are both common, but has a drawback and would not be my > choice of approach. I prefer to use a lexical var (with file scope) > and assign it via command line o

Re: Debugging and passing constant value at run time

2015-07-07 Thread Ron Bergin
> \$VERBOSE ); if( $DEBUG ){ say 'hello'; say 'goodbye' if $VERBOSE > 1; } Ron From: "Sharanbasappa Raghapur, ERS, HCLTech" To: "Perl Beginners" Sent: Tuesday, July 7, 2015 4:40:35 AM Subject: Debugging and passing constant value at run t

Re: Debugging and passing constant value at run time

2015-07-07 Thread Shawn H Corey
On Tue, 7 Jul 2015 11:40:35 + "Sharanbasappa Raghapur, ERS, HCLTech" wrote: > I am using constant mainly to enable printing of debugging messages > (e.g. use constant DEBUGGING_L1 => 0;) Normally, the value is '0' and > when I need to see debug messages, I make this 1 and run the script. > >

Debugging and passing constant value at run time

2015-07-07 Thread Sharanbasappa Raghapur, ERS, HCLTech
Hi, I am using constant mainly to enable printing of debugging messages (e.g. use constant DEBUGGING_L1 => 0;) Normally, the value is '0' and when I need to see debug messages, I make this 1 and run the script. Is there a way to allocate value to constants at run time so that I can avoid editi