Coding standards

From IrisFrame

Jump to: navigation, search

The coding standards are here to help keep the code consistent, readable and understandable.

Most of it is based on Perl Best Practices, by Damian Conway.

Spaces and braces

One strong rule that will not be bended: don't use tab characters. Use a 4 real space indentation. Your editor should be configured to use spaces instead of tabs.

Braces should be like this:

sub FooBar {
    my ($foo, $varName) = @_;
    if ($foo > $varName) {
        print "Foo > varName\n";
    }
    else {
        print "VarName > foo\n";
    }
}

Naming convention

Comments

Personal tools