On Fri, 01 Apr 2005 07:29:17 -0500, Peter Rabbitson wrote: > [...] I decided to create a central Configuration.pm > which will hold different hashes with "configuration sections" e.g.: > > package Configuration; > > %Configuration::auth = ( >[...]....... > > You get the idea. Now I am able to access them from Main by doing: > > use Configuration; > > my $whatever_reference = $Configuration::auth{mmv}{tbt}; > > however if in main I have another module: > > use SomeOther::Module; > > then from within this module the same variable returns undef. I suspect I > can not do this since the scopes differ,
Not the problem. > but I am using fully qualified > variable names. Another way would be to use Configuration in the very same > module, however then Configuration.pm got to reside in the main dir AND a > copy in ./SomeOther/... False. > I am lost. True :-) > Is what I am trying to do even right > from a good programming point of view? Probably the total amount of modules > accessing these Configuration variables will be around 10. I would highly > appreciate any input on this. Examine your concept of "reside in". You appear to be confused with modules that use the Exporter. You don't. I believe you'll find that you use SomeOther::Module *before* using Configuration in the main program, which means that the assignments haven't taken place yet. What you're doing is reasonable. And you can 'use Configuration' from all of the other modules if you want; it will only be loaded once, after that, its name in %INC will prevent it from being loaded unnecessarily. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>