Thrift::Parser::Type::Enum - Enum type
This class inherits from Thrift::Parser::Type; see docs there for inherited methods.
Pass either a named element of the enumeration or an index:
my $value = $enum->compose('PHP'); my $value = $enum->compose('_4');
As you can see, the index is '_' + digits. Throws Thrift::Parser::InvalidArgument
Same as "compose" when called with '_' + digit.
Same as "compose" when called with an element name.
my $object = $enum->compose('PHP'); $object->value_name == 'PHP';
Returns the name of the element referenced by $self.
Copyright (c) 2009 Eric Waters and XMission LLC (http://www.xmission.com/). All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
Eric Waters <firstname.lastname@example.org>