ElasticSearchX::Model::Generator::AttributeGenerator - Generator that emits 'has' declarations for type properties.
version 0.1.6
$string = $object->fill_property_template( $property_name, $property_value ) my $data = $object->fill_property_template( foo => 'bar' ); # $data == " foo => bar,\n" my $data = $object->fill_property_template(quote( 'foo' ) => quote( 'bar' )); # $data == " \"foo\" => \"bar\",\n"
$string = $object->fill_attribute_template( $attribute_name, $attribute_properties_definition ) my $data = $object->fill_attribute_template( foo => ' is => rw =>, ' ); # $data == # has "foo" => ( # is => rw =>, # );
$generated_attribute = $attributegenerator->generate( propertydata => ... Property definition from JSON ... propertyname => ... Property name from JSON ... index => ... Name of current index ... typename => ... Name of the type we're generating ... ); $generated_attribute->isa(ESX:M:G:Generated::Attribute);
rw, required, weak_ref
%attr = ( %attr, expand_type( $type ) ); %attr = ( %attr, expand_type( 'boolean' ) );
$string = hash_to_proplist( %hash ) my $data = hash_to_proplist( is => rw =>, required => 1, foo => undef, ); # $data = <<'EOF' # "is" => "rw", # "required" => "1", # "foo" => undef, # EOF
my $attr = $self->_inflate_attribute( prefix => $dump_comment, propertyname => "name of property", properties => \%cleaned_properties_for_has original_definition => \%original_args_to_generate );
%cleaned_has_props = $self->_cleanup_properties(%source_props)
Kent Fredric <kentfredric@gmail.com>
This software is copyright (c) 2013 by Kent Fredric <kentfredric@gmail.com>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install ElasticSearchX::Model::Generator, copy and paste the appropriate command in to your terminal.
cpanm
cpanm ElasticSearchX::Model::Generator
CPAN shell
perl -MCPAN -e shell install ElasticSearchX::Model::Generator
For more information on module installation, please visit the detailed CPAN module installation guide.