diff options
Diffstat (limited to 'devel/p5-enum/DESCR')
-rw-r--r-- | devel/p5-enum/DESCR | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/devel/p5-enum/DESCR b/devel/p5-enum/DESCR new file mode 100644 index 00000000000..900320ee8b9 --- /dev/null +++ b/devel/p5-enum/DESCR @@ -0,0 +1,11 @@ +Defines a set of symbolic constants with ordered numeric values ala C +enum types. + +Now capable of creating creating ordered bitmask constants as well. See +the BITMASKS section for details. + +What are they good for? Typical uses would be for giving mnemonic names +to indexes of arrays. Such arrays might be a list of months, days, or a +return value index from a function such as localtime(): + +use enum qw(:Months_=0 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec); |