On Thu, Oct 09, 2014 at 03:50:02AM +1300, Kent Fredric wrote:
  First, what are you trying to acheive.
  Global variables are rarely a good idea, as is sharing variables
  between files.
  So the question is, why are you trying to share a variable between
  files using globals?
  My suggestion is you should be using an exporter of some kind, or
  qualifying the variables by name at very least.
  Also, why are you *requiring* .pl files by string name? That is
  reasonably poor design and I would be interested in learning what
  educational material you are consuming that lead you to your current
  course of action so I can make a point of not recommending it =)

Thank you, Kent. I studied perldoc perl* pages years ago. Requiring I have made
"accidentally" while stripping down the example. I wanted not to use "use",
to get rid of import.

I want to use one global hash variable for options or configuration variables
like verbose, debug.  I don't want to pass them to each function
or to almost each object.

HG

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to