blob: b37d5e80cc9f6f7fe7ce84f2b89a2d9056653b47 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
|
use Object::Enum qw(Enum);
my $color = Enum([ qw(red yellow green) ]);
# ... later
if ($color->is_red) {
# it can't be yellow or green
WWW: http://search.cpan.org/dist/Object-Enum
Author: Hans Dieter Pearcey
|