Module namespace for projects

James Laver james.laver at gmail.com
Thu May 22 11:20:22 BST 2014


On 22 May 2014, at 09:59, Andrew Beverley <andy at andybev.com> wrote:

> Hi guys,
> 
> I'm creating a Perl project that I hope to eventually release (a Postfix
> filter to add signatures to outgoing emails). My aim is to eventually
> release it as a Debian package.
> 
> A stupid question, but I'm a bit unsure about how I should define the
> namespace for my project's modules. Do I need to slot any program
> modules into the CPAN namespace?
> 
> So, for example, I'll have a module to manage all the database aspects.
> Let's say the program will be called "emailsig" and I use Emailsig::DB
> for the database queries. Presumably the module Emailsig::DB would
> eventually need to be installed under /usr/share, so should I actually
> be naming the module something like Email::Emailsig::DB?
> 
> Following on from the above, should I then be uploading the modules to
> CPAN?
> 
> Grateful for any advice!
> 
> Andy

Hi Andy,

First thing I’d say is give your project a short-ish name so that if you do release it to the cpan, you won’t die of RSI.

Second thing is to pick a root Module name that doesn’t  clash with something in cpan. Other than that, don’t worry. So you’d still be able to have Emailsig::DB. Besides, I wouldn’t worry about eventually now, and when you do, I’d expect you’ll decide there are better approaches than what you describe.

If the modules are something you think would be useful to someone else, then please do upload them. Or at least make them easily available on github.

James


More information about the london.pm mailing list