Eric Waters > Thrift-Parser-0.06 > Thrift::Parser::FieldSet

Download:
Thrift-Parser-0.06.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

Thrift::Parser::FieldSet - A set of fields in a structure

USAGE ^

fields

Returns an array ref of all the fields in this set.

named

  my $value = $field_set->named('id'); 

Searches the fields in the set for the field named $name. Returns the value of that field.

id

  my $value = $field_set->id(2);

Searches the fields in the set for the field with id $id. Returns the value of that field.

ids

Returns an array ref of the ids of this field set.

field_values

Returns an array ref of the values of the fields in the set.

keyed_field_values

Returns a hashref where the keys are the names of the fields and the values are the values of the fields.

keyed_field_values_plain

Returns a hashref where the keys are the names of the fields and the values are the plain values of the fields.

compose

Used internally by Thrift::Parser::Method and Thrift::Parser::Struct. Given a list of key/value pairs, returns a FieldSet object informed by the IDL.

COPYRIGHT ^

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.

AUTHOR ^

Eric Waters <ewaters@gmail.com>

syntax highlighting: