I was wondering if those of you who code/maintain modules on CPAN
could offer a little advice.
I've written a handful of small modules that I find myself re-using
in a lot of different mod_perl applications that I do for various
people. None of them are earth-shaking, but they're useful enough to
me that I try to keep them up.
I also do some site hosting for some of the clients I do jobs for,
and so I find that my mod_perl namespace is starting to sag with
multiple versions of these modules, which is stupid. I have things
like [proj_a]::ListManager.pm, [proj_b]::ListManager.pm, and so on,
which are identical. Dumb.
It occured to me that maybe it's time to tighten these babies up a
little and put them in a shared namespace that can be accessed by all
of the projects I use them for. Whether they'd ever be good enough
to consider releasing to CPAN is unclear to me now, but I'd like to
avoid doing something that will cause problems later if I decide to
really get my act in gear and contribute someday.
I thought this might be a good time to learn how to do a proper
packaging of the modules so they could be installed via the standard
"perl Makefile.PL && make && make test && make install", and I've
begun to find documentation about how to do that.
As far as naming goes, though, I'm a little stuck. These little
modules are really quite disparate; many are web-related, and some
are just general shortcuts and code snippets. I'm guessing they
should probably all be under a theoretically-private namespace that
isn't currently in use, and so I was considering choosing something
like "SGT" as a top level namespace, so I'd have "SGT::ListManager",
"SGT::Session", and so forth, but that would presume that "SGT" would
never be used as a "real" namespace on CPAN (it isn't at present, as
far as I know, but who knows?).
One of the CPAN docs says to use something like "Foo_Corp" as a
namespace for modules that may or may not be released to the world
someday, as a way to avoid potential namespace collisions. Is a
"_Corp" suffix a better way to do this, so I'd have "SGT_Corp::Foo"
and so forth?
Any advice appreciated.
Cheers,
Steve Linberg
--
Steve Linberg, Chief Goblin
Silicon Goblin Technologies
http://silicongoblin.com
Be kind. Remember, everyone you meet is fighting a hard battle.
_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm
- Re: [Boston.pm] Module naming conventions Steve Linberg
- Re: [Boston.pm] Module naming conventions Kenneth Graves
- Re: [Boston.pm] Module naming conventions Steve Linberg
- Re: [Boston.pm] Module naming conventions email
- Re: [Boston.pm] Module naming conventions John Tobey
- Re: [Boston.pm] Module naming conventions Steve Linberg
- Re: [Boston.pm] Module naming conventions Simon Wilcox
- Re: [Boston.pm] Module naming conventi... Paul Makepeace
- Re: [Boston.pm] Module naming conventions Andrew M. Langmead
- Re: [Boston.pm] Module naming conventi... darren chamberlain

