I have several CPAN modules that make extensive use of meta-programming to cut down on boiler-plate and to ease refactoring.
The consequence of this however is that there are many packages that get created programmatically, thus there is never a package X::Y::Z;
line in the source code for CPAN to find (and then use to add the namespace to your first-come list of reserved namespaces).
So my question is if there is a preferred way of letting CPAN know about these runtime created packages. Here are the options I am currently considering:
pm
file for CPAN to index.provides
list.build dist
to update the provides
or some other section of META.yaml
The last option is currently what I am leaning towards. I'd like to know if there are any problems with this approach, or any better ways of keeping CPAN updated with the complete list of packages.
If I'm reading you correctly this is a non-issue, providing you don't clobber other namespaces. There is no pre-requisite to declare every namespace created, only the base namespace of your distribution and the files associated with the distribution. If you wanted to "reserve" certain namespaces, instead of creating blank .pm files, look at creating .pod files and document instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With