just my opinion:
When you use require and you use this hash everywhere than you could also make a module (*.pm) with a module global hash and simply use this module. This would transfer the instantiation time of the big hash to the compile time. A hash in perl notation is simpler to edit than a hash represented as a Storable object.
I would think much more about another thing. When you use the global hash the using party has to know the keys and the structure of that hash. Therefore the knowledge about the hash is spread all over the code which uses it. That makes it hard to change somthing in teh hash when you have to. I would encapsulate the whole hash into a object holding the informations and querying this object with methods which fit the common use cases. This gives you an abstraction from the way you implemented it. Then you can store it as a package global hash, as a hash which you slurp at runtime via require or you slurp a storable representation of that hash or you put the whole thing into a database. You can even change the structure as long as the querying methods don't change their API.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||