Except for the files in script/ and util/, svn:executable should always be unset, even for test files.

Shebang lines

All test files should not use any shebang line, as they specify a single runtime for the code but Perl 6 code should run under multiple runtimes, Pugs and the v6 Perl 5 module to name two. Remember to put a use v6 in the beginning of your Perl 6 programs, too, to keep perl5 from accidentally running Perl 6 code.

Naming conventions

"Perl 6" is the name of the programming language and the project, while "perl6" is the name of the Perl 6 compiler/interpreter.

"Pugs" is the name of the Pugs project, while "pugs" is the name of the binary pugs, i.e. the compiler/interpreter.

"Perl 5" is the name of the programming language and the project, while "perl5" is the name of the Perl 5 interpreter.

Editing

There is a util/perl6.vim Vim syntax file. There is an enhanced util/cperl-mode.el Emacs mode. If you don't use it, then original perl-mode works better than original cperl-mode.

Where applicable, conventions documented in Damian Conway's "Perl Best Practices" book (O'Reilly, 2005) should be followed by default. At the very least, all indenting should be done with spaces (4 per indent level) rather than tabs, so the code and documentation looks the same to everyone.

If you use Vim, you may want to set the following settings:

set shiftwidth=4 autoindent expandtab smarttab softtabstop=1

This will cause Vim to insert four spaces instead of a real tab upon pressing <Tab>. The equivalent settings for Emacs are:

c-indentation-style: bsd
c-basic-offset: 4
indent-tabs-mode: nil

If you use Emacs with the enhanced util/cperl-mode.el, you can set these code conventions in your config file with:

(add-hook 'cperl-mode-hook
'(lambda () (cperl-set-style "Pugs")))

If you use BBEdit, you can configure it to auto-expand tabs like this:

0.

Launch the BBEdit application.

1.

In the 'BBEdit' (application) menu, choose 'Preferences'.

2.

In the resulting dialog box, choose 'Editor Defaults' from the left col.

3.

In the resulting panel, ensure 'Auto-Expand Tabs' is checked.

4.

Also ensure the 'Default Font' is set to '4 spaces per tab'.

5.

Close the dialog box.

These exact settings apply to BBEdit 8, the newest version; older versions of the program may store the same configuration options elsewhere.

Testing

See Pugs::Doc::Run and t/README. If you wish to use the prove utility to run individual tests or test directories, you will need to set at least the following environment variables first: