On Wed, 8 Oct 2014 21:36:06 +0200
Hans Ginzel <h...@matfyz.cz> wrote:

> 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.

package main;
our %Opts = (
  verbose => 0,
  debug   => 0.
);

# you can use %::Opts anywhere.
# See `perldoc -f our`


-- 
Don't stop where the ink does.
        Shawn

-- 
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