Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 perusing the Monastery: (6)
As of 2015-07-05 15:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (67 votes), past polls