Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Crazy constant question...

by SuicideJunkie (Vicar)
on Dec 15, 2010 at 20:57 UTC ( [id://877372]=note: print w/replies, xml ) Need Help??


in reply to Crazy constant question...

XY check: Are these trying to emulate enumerated types? If not, might hashes make more sense?

Could you not do something like:

my %consts = (FOO => 42, BAR => 99); my %names = reverse %consts;
then make the hashes read only or base your use constants on them?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2024-03-28 19:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found