I personally like to come up with a good name before I start writing a module. It gets me fired up, plus I don't have to fix the module name everywhere in my distribution when I change it later. (Thank goodness for subversion, which makes moving/renaming across directories easy!) Unfortunately, in the rush of enthusiasm to start a new module, the name I start off with is not always the best name to end up with. In the end, I think "measure twice, cut once" is a good way to go.
Module naming is an art, not a science. I generally find myself trying to balance clarity, brevity and consistency (with the existing namespace) -- which is an awful challenge (and leads to exercises such as Module Naming Dilemma -- where the module being debated itself is designed to abbreviate too-long module names).
I know that many people aren't fond of modules@perl.org and the strict naming gauntlet you run there. That said, from personal experience, I think it's worth at least doing once or twice -- even if you disagree with it -- because going through it will change how you think about module naming.
Likewise, discussion on PM or comp.lang.perl.modules or whatever is good just for its own sake. In general, rather than ask for suggestions, I'd argue that you should be making a case. "I'm calling my module X::Y::Z for these reasons." Then defend it. Just having to articulate your reasons is a good exercise. It helps weed out what you think are cute or clever names but don't mean to others what they mean to you. These kinds of dicussions rarely, if ever, get to a crystal clear answer -- you still have to exercise judgement.
If someone says "XXX::YYY" (or "not XXX::YYY") and doesn't explain it, just ask yourself how you'd defend that point. If you, the module author, don't "get it", feel free to discard the suggestion. Note -- that doesn't mean discard it if you "get it" but just don't agree with it. Anything you understand and don't agree with is worthy of deeper consideration. Think of a sort of Hegelian "thesis/antithesis/synthesis" here -- or just basic college debating practice. Understand what would disprove your idea of a module name and only then will you know if it's a good name or not.
In my opinion, the point of discussion isn't to find the answer from others, but to challenge yourself and the assumptions you made when you called it "Y::Z" in the first place in the middle of your excitement of writing a new module.
-xdg
Code posted by xdg on PerlMonks is public domain. It has no warranties, express or implied. Posted code may not have been tested. Use at your own risk.
In reply to Re: On naming modules/asking for advice
by xdg
in thread On naming modules/asking for advice
by Eyck
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |