foo() looks prettier than
&foo(). Let perl 4 die.
You can do this:
But only if you really know why. I bet you'll never need to.
Use empty parens when calling global functions:
But not when calling methods on objects:
Lines longer than 80 characters are okay, but not great.
If you are in package LJ and calling an
LJ::* API function,
go ahead and type the extra four characters (LJ::) even if they are not
necessary… being explicit is nice for the reader.
Follow best practices and standards. A well-regarded guide is Damian
Conway's book “Perl Best Practices”.
If you think it may help try something like the
or its web-service at
http://perlcritic.com. The module is not used
by the LiveJournal code, so remember to remove references to it before committing/submitting
your code. Remember: Guidelines and practices in this Programming Guide take
priority over other coding standards. In turn, you may give priority to
practices that divert from the guidelines in this Programming Guide, when you
really know what you are doing and have
a good reason for doing so.