#!/usr/bin/env perl use Google::ProtocolBuffers::Dynamic::ProtocPlugin help => 'podusage', run => 'Google::ProtocolBuffers::Dynamic::MakeModule'; exit 0; __END__ =head1 NAME protoc-gen-perl-gpd - protoc plugin for Google::ProtocolBuffers::Dynamic =head1 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 =head1 DESCRIPTION This F plugin generates wrapper modules for protobuf messages, to avoid the need of shipping F<.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. =head1 OPTIONS =head2 package=PACKAGE Specifies the output package/file (C creates a module named F 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 C will be mapped to C). =head2 map_package=PACKAGE,prefix=PREFIX[,OPTIONS] Equivalent to the C mapping of L. The C sub-option is mandatory. C is a comma-separated list, see L for available options. =head2 pb_prefix=PACKAGE,prefix=PREFIX[,OPTIONS] Equivalent to the C mapping of L. The C sub-option is mandatory. C is a comma-separated list, see L for available options. =head2 map_message=MESSAGE,[,OPTIONS] Equivalent to either the C or C mapping of L. Either C or C sub-option is mandatory. C is a comma-separated list, see L for available options. =head2 Mapping options The following options map one to one to the C key of L. When specified before the first mapping, they are applied to all mappings. Boolean options: C, C, C, C, C, C, C, C. When specified they set the option value to 1, when prefixed with C (e.g. C) they set the option value to 0. String options: C, C and C set the corresponding option to the specified value =head1 INSERTION POINTS Generated code uses insertion points to enable customization via C plugins. The L offers more details on what insertion points are and how they can be used. L and L source code is a simple example of a C plugin that uses insertion points. Currently available insertion points: =head2 after_pragmas Inserts code after the C at the top of the module. =head2 after_loading Inserts code after serialized descriptors have been loaded, but beforre mapping. =head2 after_mapping Inserts code after mapping options have been applied. =cut