[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] Perl coding style



On 01/18/2013 10:00 AM, Brandon Wood wrote:
>    Not sure if you're trolling or looking to have a more specific
> discussion as "most perl coders" is a bit of a broad statement. There
> are a LOT of Perl coders, many with different styles. So far as the
> language itself is concerned you can do it different ways; though there
> are suggested good practices.
>

Here is one thing I do that may make only perl people mad.

a.  All executable code is in subs.

b.  The bottom of the program looks like this:

sub main {
  ....
  return X;
}

exit main;

# vi: set ts=2 sw=2: #


So the only executable code outside of a sub is 'exit main;'

:)