Kephra / lib / Kephra / StyleGuide.pod

=head1 Kephra Coding Style

=head2 Technical Details

    bracketing     = K & R
    indention size = 4
    use of tabs    = yes
    line with      = 80 (not strict)
    utf            = only in strings
    perl version   = 5.12
    pragmas        = warnings

=head2  What Part Of Perl We Use Or Avoid

=head2 Organisation

1 module - 1 name - 1 namespace

=head2 Naming

We try to reuse same names for same (seldom similar) purpose,
throughout all modules,
or the same data part through different structures.

We also try to lean toward natural Perl names (eg 'sub' 'coderef', 'push').

=head3 module/class Names

camelcase                      ~~ LikeThis

=head3 sub/method Names

lowercase words separated by _ ~~ like_this

routines only to be called inside a module start with one _
avoid to call these from outside by all means

create not make when we generate something

=head3 Variable Names

lowercase words separated by _ ~~ like_this
We say active, no more current or recent.

$self   reference of the class itself

$ed     in most cases the active editor pane
        (was renamed from $ep to prevent simple copy and paste of old code)

$doc    active document

$tabbar active tab bar

$file   full file path, unless oyur specific like file_name, file_path etc.

$win    main window

=head3 Command Names

words separated by -

=head3 Event Names

words separated by .

=head3 Key Definitions

keys separated by +