Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Within this function, I am checking the values in a hash that is a global variable (declared with 'our'). Values in this hash are assigned by a method call. I don't like this set up and I want to change things.$html = function();
However one thing that I can't do is this:
The function must remain a function and not become a method.$html = $self->function;
What could I do within the function, so that I am not checking the value of a global variable that is altered by a separate method?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How can I stop relying on a global variable?
by jdporter (Paladin) on Feb 03, 2006 at 19:07 UTC | |
|
Re: How can I stop relying on a global variable?
by philcrow (Priest) on Feb 03, 2006 at 19:03 UTC | |
by Anonymous Monk on Feb 03, 2006 at 19:12 UTC | |
by Fletch (Bishop) on Feb 03, 2006 at 19:28 UTC | |
by Anonymous Monk on Feb 03, 2006 at 19:37 UTC |