Class::ConstantBuild constant classes | |
Download |
Class::Constant Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Robert Norris
- Publisher web site:
- http://search.cpan.org/~robn/XML-Quick-0.04/lib/XML/Quick.pm
Class::Constant Tags
Class::Constant Description
Build constant classes Class::Constant is a Perl module to build constant classes.SYNOPSIS use Class::Constant NORTH, EAST, SOUTH, WEST; use Class::Constant NORTH => "north", EAST => "east", SOUTH => "south", WEST => "west; use Class::Constant NORTH => { x => 0, y => -1 }, EAST => { x => -1, y => 0 }, SOUTH => { x => 0, y => 1 }, WEST => { x => 1, y => 0 }; use Class::Constant NORTH => "north", { x => 0, y => -1 }, EAST => "east", { x => -1, y => 0 }, SOUTH => "south", { x => 0, y => 1 }, WEST => "west", { x => 1, y => 0 };Class::Constant allows you declaratively created so-called "constant classes". These are very much like enumerated types (as close as a typeless language like Perl can get, at least).The classes generated by this module are modeled closely after Java's "typesafe enumeration" pattern, but with some added spice to make them more useful to Perl programs. Requirements: · Perl
Class::Constant Related Software