Enumeration
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Enumeration.pm view on Meta::CPAN
# OO enclosure.
{
# Enumeration constants for objects created directly from the Enumeration class.
my %instance_symbols;
my %instance_value;
sub new
{
my $class = shift;
my $self = bless \do { my $dummy } => $class;
# Caller is creating an on-the-fly enumeration
if ($class eq 'Enumeration')
{
my %values = map {$_ => 1} @_;
$instance_symbols{refaddr $self} = \%values;
}
else # Caller is using a subclass
{
croak "Too many arguments to ${class}->new" if @_ > 1;
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.831 second using v1.00-cache-2.02-grep-82fe00e-cpan-a086c87fca4 )