Bug#175202: debian-policy: [PROPOSAL] Clarify Perl package naming convention with more examples
Kenneth Pronovici <email@example.com> writes:
> I guess this bug could be combined into bug #114920, but I decided to
> file it separately, since I'm not sure exactly where that bug is going.
> A discussion around bug #175061 (an ITP of mine) highlights some
> confusion I had about Perl naming conventions:
> Perhaps it would be worthwhile to update the Perl policy to provide
> several other examples of the naming convention. Section 3.2 looks like
> this currently:
> Perl module packages should be named for the primary module
> provided. The naming convention for module Foo::Bar is
> libfoo-bar-perl. Packages which include multiple modules may
> additionally include provides for those modules using the same
> I might change the section to read like this:
> Perl module packages should be named for the primary module provided.
> The naming convention is that a "-" should be used in the package
> name where ":" or "::" appear in the Perl module name, but not
> elsewhere. For example, the naming convention suggests this usage:
> Foo::Bar libfoo-bar-perl
> Foo::Bar::Baz libfoo-bar-baz-perl
> Foo::BarBaz libfoo-barbaz-perl
> Packages which include multiple modules may additionally include
> provides for those modules using the same convention.
Many years later, I'm now applying the following patch to Policy for the
next release, which spells out the existing naming convention more
diff --git a/perl-policy.sgml b/perl-policy.sgml
index 7c37446..3b76b94 100644
@@ -298,10 +298,17 @@ make install
<heading>Module Package Names</heading>
Perl module packages should be named for the primary module
- provided. The naming convention for module <tt>Foo::Bar</tt>
- is <package>libfoo-bar-perl</package>. Packages which include
- multiple modules may additionally include provides for those
- modules using the same convention.
+ provided. The naming convention is to lowercase the Perl module
+ name, prepend, <tt>lib</tt>, change all occurrences
+ of <tt>::</tt> to <tt>-</tt>, and append <tt>-perl</tt>. For
+ Packages which include multiple modules may additionally include
+ provides for the additional modules using the same convention.
Russ Allbery (firstname.lastname@example.org) <http://www.eyrie.org/~eagle/>