in reply to Re^3: refrencing a hash
in thread refrencing a hash
The value associated with that name is a reference to a nameless (anonymous) hash stored in memory. Likewise, $foo::bar::package::ERRMSG contains a reference pointing to the exact same hash in memory. To prove it, simply print the value of $ERRMSG in your config package and every package that uses it. You'll see something like:
HASH(0x1010e180)
The number is the memory address where the hash is stored, and each copy in each of your packages will have the same number there.
By the way, please check out the <code> tag for formatting your code so we can read it easily.
What problems are you having with Class::Singleton? Show some code and we'll probably be able to point to what's wrong. Remember to use the <code> ... </code> tags. :)
|
|---|