diff options
author | rillig <rillig@pkgsrc.org> | 2007-01-25 03:08:19 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2007-01-25 03:08:19 +0000 |
commit | 6993063e19956602bbfe4e93062039d99da5851f (patch) | |
tree | 49a4c6e55bb48bb23942f45f423b45c0e22add67 /devel/p5-enum | |
parent | 475a737861c1c55047cd2bc7d0e314259d136600 (diff) | |
download | pkgsrc-6993063e19956602bbfe4e93062039d99da5851f.tar.gz |
Imported p5-enum.
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);
Diffstat (limited to 'devel/p5-enum')
-rw-r--r-- | devel/p5-enum/DESCR | 11 | ||||
-rw-r--r-- | devel/p5-enum/Makefile | 17 | ||||
-rw-r--r-- | devel/p5-enum/PLIST | 1 | ||||
-rw-r--r-- | devel/p5-enum/distinfo | 5 |
4 files changed, 34 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); diff --git a/devel/p5-enum/Makefile b/devel/p5-enum/Makefile new file mode 100644 index 00000000000..29df46b9405 --- /dev/null +++ b/devel/p5-enum/Makefile @@ -0,0 +1,17 @@ +# $NetBSD: Makefile,v 1.1.1.1 2007/01/25 03:08:19 rillig Exp $ +# + +DISTNAME= enum-1.016 +PKGNAME= p5-${DISTNAME} +CATEGORIES= devel +MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=enum/} + +MAINTAINER= rillig@NetBSD.org +HOMEPAGE= http://search.cpan.org/~zenin/${DISTNAME}/enum.pm +COMMENT= Enumerations for Perl + +PERL5_PACKLIST= auto/enum/.packlist +USE_LANGUAGES= # none + +.include "../../lang/perl5/module.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/devel/p5-enum/PLIST b/devel/p5-enum/PLIST new file mode 100644 index 00000000000..0b3a7462edc --- /dev/null +++ b/devel/p5-enum/PLIST @@ -0,0 +1 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2007/01/25 03:08:19 rillig Exp $ diff --git a/devel/p5-enum/distinfo b/devel/p5-enum/distinfo new file mode 100644 index 00000000000..a6ea95c2e0e --- /dev/null +++ b/devel/p5-enum/distinfo @@ -0,0 +1,5 @@ +$NetBSD: distinfo,v 1.1.1.1 2007/01/25 03:08:19 rillig Exp $ + +SHA1 (enum-1.016.tar.gz) = d1600b60561efdb6f7f01f690e4ad179958598e5 +RMD160 (enum-1.016.tar.gz) = 40e93461960fe2c94a35d4bbb59e567bc7835509 +Size (enum-1.016.tar.gz) = 5847 bytes |