The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

protoc-gen-perl-gpd - protoc plugin for Google::ProtocolBuffers::Dynamic

SYNOPSIS

    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

DESCRIPTION

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.

OPTIONS

package=PACKAGE

Specifies the output package/file (package=Foo.Bar creates a module named Foo/Bar.pm under the output directory).

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).

map_package=PACKAGE,prefix=PREFIX[,OPTIONS]

Equivalent to the package mapping of "map" in Google::ProtocolBuffers::Dynamic.

The prefix sub-option is mandatory.

OPTIONS is a comma-separated list, see "Mapping options" for available options.

pb_prefix=PACKAGE,prefix=PREFIX[,OPTIONS]

Equivalent to the pb_prefix mapping of "map" in Google::ProtocolBuffers::Dynamic.

The prefix sub-option is mandatory.

OPTIONS is a comma-separated list, see "Mapping options" for available options.

Mapping options

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.

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.

String options: accessor_style sets accessor_style option to the specified value