in reply to Require Centralized Variables

So, why do you want to use strict? Using strict is just a tool, not a goal. In this case, it's obstructing what you want to do, so why use it? You shouldn't use something if you don't know what it does.

Using strict this way requires that all variables are either lexical, fully qualified, or been introduced with use vars. You do neither So, if you insist on using strict, you should obey the rules that are imposed. Also, if you prefer to use strict, why aren't you using it in your conf.pl file?

Abigail

Replies are listed 'Best First'.
Re: Re: Require Centralized Variables
by mhorner (Initiate) on Nov 20, 2002 at 17:02 UTC
    I understand that strict is a tool and using it helps to make sure that I am not doing something that is a violation of reasonably good coding. Therefore using strict helps in saving me extra time trying to debug stupid problems. Now, if you can tell me that you don't spend time trying to debug a stupid error without using strict, then please tell me your secret. Also, the reason I am not using strict in the conf.pl is to allow the requiring of the conf.pl file without strict complaining about the undeclared variables in the conf.pl file. There I am usually certain that the code that is included there is just a list of scalars, arrays and/or hashes.

    It wasn't my intention to have the conf.pl file be the issue at hand, but the file that is requiring the conf.pl and using the conf.pl in making the changes to my scripts easier when moving to a new system/rebuild that may not exactly replicate the system that it was previously running on.

    Thanks for the criticism,
    Matt (mhorner)