Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: using require as c like #include?

by mce (Curate)
on Jan 20, 2004 at 10:47 UTC ( [id://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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-25 17:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found