protoc-gen-perl-gpd - protoc plugin for Google::ProtocolBuffers::Dynamic
protoc --perl-gpd_out=package=Foo.Bar:lib foo.proto protoc --perl-gpd_out=package=Foo.Bar,check_enum_values:lib foo.proto protoc --perl-gpd_out=package=Foo.Bar,no_check_enum_values:lib foo.proto
This protoc plugin generates wrapper modules for protobuf messages, to avoid the need of shipping .proto files with a module/distribution.
Note that since protoc command-line parsing reserves the colon as a separator between options list and output directory, the dot is used as a package separator for both protobuf and Perl packages.
Specifies the output package/file (package=Foo.Bar creates a module named Foo/Bar.pm under the output directory).
package=Foo.Bar
If no explicit mapping is specified, protobuf packages are automatically mapped to Perl packages under the main package (e.g. protobuf package baz will be mapped to Foo::Bar::Baz).
baz
Foo::Bar::Baz
Equivalent to the package mapping of "map" in Google::ProtocolBuffers::Dynamic.
package
The prefix sub-option is mandatory.
prefix
OPTIONS is a comma-separated list, see "Mapping options" for available options.
OPTIONS
Equivalent to the pb_prefix mapping of "map" in Google::ProtocolBuffers::Dynamic.
pb_prefix
The following options map one to one to the options key of "map" in Google::ProtocolBuffers::Dynamic. When specified before the first mapping, they are applied to all mappings.
options
Boolean options: implicit_maps, use_bigints, check_required_fields, explicit_defaults, encode_defaults, check_enum_values, generic_extension_methods. When specified they set the option value to 1, when prefixed with no_ (e.g. no_use_bigints) they set the option value to 0.
implicit_maps
use_bigints
check_required_fields
explicit_defaults
encode_defaults
check_enum_values
generic_extension_methods
no_
no_use_bigints
String options: accessor_style sets accessor_style option to the specified value
accessor_style
To install Google::ProtocolBuffers::Dynamic, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Google::ProtocolBuffers::Dynamic
CPAN shell
perl -MCPAN -e shell install Google::ProtocolBuffers::Dynamic
For more information on module installation, please visit the detailed CPAN module installation guide.