in reply to Re^3: Strict isn't strict enough (stop it)
in thread Strict isn't strict enough

You are right in thinking that I am concerned with global variables. I don't have a problem with using global variables for things that genuinely are global. Typically I read or generate these at the start of my code and then never change them, so I'm not particularly concerned for my sanity in that regard. I intended my OP question to be along the lines of "how do I avoid typos creating global variables I didn't want". If I can't do that, I have genuine fears for my sanity. :-)

Regards,

John Davies

  • Comment on Re^4: Strict isn't strict enough (stop it)

Replies are listed 'Best First'.
Re^5: Strict isn't strict enough (stop it)
by roboticus (Chancellor) on Jan 01, 2012 at 06:57 UTC

    davies:

    Then I'd use the reply from tye using Exporter. It'll let you mark the globals you want to be accessible, and then let you import them into the local namespace. If you typo it, then you'll get a message to the effect that "module foo doesn't export variable bar".

    ...roboticus

    When your only tool is a hammer, all problems look like your thumb.