I did what you expalined but still this is what I see on perl-status
Data Dump of foo::bar::package::ERRMSG SCALAR
$foo::bar::package::ERRMSG = {
'CUSTLINK_CREATESESSION_506' => 'We did not recognize your member name or password. Please re-enter your member name and password. (Error 506)',
'CUSTLINK_GETVALUE_506' => 'We did not recognize your member name or password. Please re-enter your member name and password. (Error 506)',
'CUSTLINK_LOOKUP_506' => 'We did not recognize your member name or password. Please re-enter your member name and password. (Error 506)'
};
whereas I wanna show this ($foo::bar::package::ERRMSG = ) saying (package::config::ERRMSG)
thanks in advnace | [reply] |
$package::config::ERRMSG is just a name. You can access the value associated with that name by simply saying $package::config::ERRMSG from anywhere in any package. But you can't assign a name to another name; that just doesn't make sense.
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.
Also see perlref and perldsc.
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. :)
| [reply] |