./devel/p5-enum, Enumerations for Perl

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: pkgsrc-2014Q3, Version: 1.100, Package name: p5-enum-1.100, Maintainer: pkgsrc-users

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);


Required to run:
[lang/perl5]

Master sites: (Expand)

SHA1: 5654bfa49b947d7f22e1a2531e5608770c89329b
RMD160: 0da239a68e8a97852398e4e9b645e19c86463832
Filesize: 7.609 KB

Version history: (Expand)