in reply to Re: Re: A lil module creation advice
in thread A lil module creation advice
Now. I have just spoken to the main coder about my issue and he made it clear that what I was doing was setting a scalar by calling a function which of course I was but that this was causing the problem. He also said that I needed to simply make a bunch of functions and not worry about creating any global scalars or arrays.Nice to see that you got to the bottom of it. Global variables are generally agreed to be bad news, and show up quite clearly with
In fact, if you try to run code with global variables in an Apache+ModPerl configuration, it will break in strange, wonderful and inconsistent ways.use strict;
As greywolf says, use strict; is your friend.
See also this thread for a discussion on use of global variables.
|
|---|