./devel/p5-enum, Enumerations for Perl

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


Branch: pkgsrc-2016Q3, Version: 1.110nb1, Package name: p5-enum-1.110nb1, 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);


Master sites: (Expand)

SHA1: 81d82e2aa89a341a67036ed0904f4749f2ee1525
RMD160: e47974c70ffc8b962699ab7babb29514ba79c639
Filesize: 7.698 KB

Version history: (Expand)