On Wed, May 16, 2001 at 07:13:22AM +0200, Bjoern wrote:
> i want to define a global variable  which is also present in subroutines
> coded in
> extra perl modules.
> I tried this "our $test;" but amod_perl tells me following "Global
> symbol "$test" requires explicit package name" I know, this is a
> question which may be not right here !
> I don`t want to use the perlmodule CGI !!
> 
> I hope some persons can help me,

primarily, global variables are looked down upon.

but like the error message says, you can explicitly name any
global like this:

        $The::Meaning::Of::Life::The::Universe::And::Everything = 42;

you might also try

        use vars($Something);
        $Something = &whatever();

but you should probably use closures and references instead.
(i'll be re-coding my website to avoid globals in the next
few weeks, now that i understand what i just said, there. :)

see also

http://thingy.kcilink.com/modperlguide/porting/Dynamically_updating_configurati.html

-- 
What do I need manners for? I already got me a wife.
        -- Adam Pontipee, "Seven Brides for Seven Brothers"

[EMAIL PROTECTED]
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!

Reply via email to