Re: [code-review] Module Bt::Tracker

Jean-Michel Hiver <[email protected]> Tue, 10 Feb 2004 10:49:01 +0000
Newsgroups gmane.comp.lang.perl.code-review-ladder
Message-ID <[email protected]>
On Mon 09-Feb-2004 at 06:52:47PM -0600, belld96 wrote:
> This is a module I'm working on. The namespace hasn't been registered (as far 
> as I know), and it's in beta stages.

This looks like a great module.

However, I am wondering why a connection to a DBI object is required. It
seems to me that you are mixing two different bits of functionality in
one module.

Why not modularize further and have all the network stuff in one module
and all the database stuff in another?

Also, you should make it very clear that your module can actually be
used for a bittorrent tracker, not a client. At first I thought it was a
module that could be used to query bittorrent trackers.

Furthermore, I'd frankly go for the name Bittorrent::Tracker. It's a bit
lengthier but it can't be confused for, say, "British Telecom".

So maybe have at least the following structure for your project:

bin/tracker.cgi
lib/Bittorrent/Tracker/Server.pm
lib/Bittorrent/Tracker/Server/Network.pm
lib/Bittorrent/Tracker/Server/Backend.pm
lib/Bittorrent/Tracker/Server/Backend/DBI.pm

If it was all on CPAN it'd be real nice as well :)

Cheers,
Jean-Michel.
-- 
Building a better web - http://www.mkdoc.com/
---------------------------------------------
Jean-Michel Hiver
[email protected]  - +44 (0)114 255 8097
Homepage: http://www.webmatrix.net/