Packages generated by Google::ProtocolBuffers are missing the package name. This makes it
difficult to ship them with packaging systems such as RPM which depend on perl modules
having a 'package' line in them to determine dependencies from. The changes below resolve
this issue, and add the package line to the module.
164 # Start changes for 0.09. Add the package name to the package
165 my @entries = split(/\//, $opts->{generate_code});
166
167 # remove blib and lib
168 shift @entries for 1..2;
169
170 # build the package name
171 my $pkg = join('::', @entries);
172
173 # remove the '.pm'
174 $pkg = substr($pkg, 0,length($pkg)-3);
175
176 print $fh <<"HEADER";
177 ##
178 ## This file was generated by Google::ProtocolBuffers ($VERSION)
179 ## on $timestamp
180 ##
181 package $pkg;