On Friday 02 November 2001 20:14, Stephen Adkins wrote:
> I have grabbed the Slash style guide, removed/modified
> the offending sections (exit/die, DESTROY, shift), and
> created a proposed P5EE style guide.
It seems that you forgot shift. Please remove it, or even better, incite
people to use it except when there is a really good reason not to (eg silly
accessors sub getFoo { return $_[0]->[FOO]; } ).
Something that needs to be discussed imho is whether we have constants
defined with my $CONSTANT = 50 or with use constant CONSTANT => 50. Both have
pros and cons, and I never really could make up my mind here.
I'd go against omitting the final semicolon on blocks. That's the surest way
of coming up with a syntax error the first time you append something.
Similarly, I'd recommend always finishing array and hash content declarations
with a trailing comma.
Also, given the fact that we're using exceptions all over, I'd recommend that
methods return an object whenever it is possible so that method calls can be
chained. Also, all subs should have an explicit return, set to "return;" if
they really don't return anything.
> Method Naming: $obj->methodNameLikeThis();
I was expecting since day 01 that this would be the first debate on this
list, and it appears that it's shaping up to be that indeed :) I personally
prefer methodNamesLikeThis because it makes separating methods from variables
visually much easier (given variables that use a $var_foo scheme). Something
tells me that this argument, despite its infinite wisdom, will not suffice to
convince everyone ;-) A decision has to be made here however because we
definitely want to be consistent on this, so if there is strong opposition to
the above I think we should vote.
--
_______________________________________________________________________
Robin Berjon <[EMAIL PROTECTED]> -- CTO
k n o w s c a p e : // venture knowledge agency www.knowscape.com
-----------------------------------------------------------------------
By the time they had diminished from 50 to 8, the other dwarves began
to suspect Hungry.