in reply to (tye)Re: change 'use constant' value through commandline arguments?
in thread change 'use constant' value through commandline arguments?
# set debugging switch to OFF my $debug_switch = 0; # go through the argument evaluation at compile time BEGIN { # check each argument foreach $_ (@ARGV) { # is the debug switch submitted? if (/^-d$/i) { # yup. set debugging switch to ON $debug_switch = 1; } } } # set DEBUGGING to the debug_switch value use constant DEBUGGING => $debug_switch;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: change 'use constant' value through commandline arguments?
by Kanji (Parson) on Mar 15, 2002 at 01:27 UTC | |
|
Re: Re: (tye)Re: change 'use constant' value through commandline arguments?
by blakem (Monsignor) on Mar 14, 2002 at 23:45 UTC | |
|
Rex3: (tye) change 'use constant' value through commandline arguments?
by Sweeper (Pilgrim) on Mar 15, 2002 at 06:50 UTC | |
by neuroball (Pilgrim) on Mar 15, 2002 at 18:52 UTC |