Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: How to include a large number of constants?

by friedo (Prior)
on Apr 27, 2005 at 19:09 UTC ( [id://452089]=note: print w/replies, xml ) Need Help??


in reply to How to include a large number of constants?

At a previous job I used enum and a bit of symbol-table trickery:

package Constants; use base 'Exporter'; use enum qw(:C_ FOO, BAR, BAZ); our @EXPORT = grep /^C_/, %{__PACKAGE__ . "::"}; 1;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2024-03-28 15:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found