Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
There's more than one way to do things
 
PerlMonks  

Re: using require as c like #include?

by mce (Curate)
on Jan 20, 2004 at 10:47 UTC ( #322554=note: print w/ replies, xml ) Need Help??


in reply to using require as c like #include?

I prefer the kiss solution :-)
Package Cfg::Hash; $Cfg::Hash::HoH={ A => 1 }; 1;
and in the main code:
use Cfg::Hash; # provided it can be found warn $Cfg::Hash::HoH->{A};
So, just fully qualify your hashes, and it is very easy to find where they are defined. (and strict will not complain).
ps: this is similar to the our approach.
---------------------------
Dr. Mark Ceulemans
Senior Consultant
BMC, Belgium


Comment on Re: using require as c like #include?
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://322554]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (13)
As of 2014-04-21 15:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (495 votes), past polls