Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

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?

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2015-10-04 12:27 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (102 votes), past polls