Re: [code-review] Just subscribed

Jean-Michel Hiver <[email protected]> Thu, 18 Sep 2003 12:31:36 +0100
Newsgroups gmane.comp.lang.perl.code-review-ladder
Message-ID <[email protected]>
> Obligatory name flame: none of this needs to be in a private namespace, since
> that implies it's not useful outside of the MKDoc context. (and hence shouldn't
> be on CPAN) If there's just a generic XML tokenizer, it should be called
> XML::Tokenizer. 

Well there are a few reasons for that:

a/ I don't like to take 'generic' namespaces because it would make me
feel like I pretend to have the ultimate solution to something. So it
would really need to be called 'XML::Tokenizer::MKDoc' or something.

Frankly I really don't like module names such as 'XML::Parser' or
'Template': too generic.

b/ Our aims are to make each component that is modularized out of MKDoc
useful in itself, but still keep MKDoc coherent as a whole. Getting my
own 'MKDoc' namespace allows just that.

So rather than have:

XML::Tokenizer::MKDoc
XML::TreeBuilder::MKDoc
XML::Tagger::MKDoc
XML::Stripper::MKDoc

Somehow this suits me best:

MKDoc::XML::Tokenizer
MKDoc::XML::TreeBuilder
MKDoc::XML::Tagger
MKDoc::XML::Stripper

I suppose that's no good justification really... I guess I don't really
like the CPAN generic names. I like namespaces... Must be a distant
remain of Javaism :)


> It might be nicer for XML::Tokenizer to use qr// for the compiled
> regexes.

OK. I'll look into that.


> In MKDoc::XML::Token, you're doing yourself a disservice by
> writing comments on the methods then documenting them in the POD
> later. Documenting something twice is almost as bad as writing code
> twice.

Sort of is. In my opinion POD is ugly, takes up a lot of space and is
hard to read. Again I am biased towards Java style comments and javadoc
which look incredibly slicker to me.

Note that there are a lot of things which I hate about Java, which is
why I'm doing Perl stuff :-)

I suppose at some point I should really look into writing an alternate
POD parser which generates POD off my comment style and plug that in the
makefile.

But I agree with you, duplication is a Bad Thing.

Thanks for these comments, I find them very useful.
Any more comments?
-- 
Building a better web - http://www.mkdoc.com/
---------------------------------------------
Jean-Michel Hiver
[email protected]  - +44 (0)114 255 8097
Homepage: http://www.webmatrix.net/