The extensions recommended for files with Raku content.
File contents | Extensions recommended or used at one time | Current recommendation |
---|---|---|
Language files: | ||
Raku script | .pl, .p6 | .raku |
Raku module | .pm, .pm6 | .rakumod |
Raku documentation | .pm, pm6, pod, pod6 | .rakudoc |
Test files in raku | .t | .rakutest |
Not Quite Perl (NQP) | .nqp | |
Module specific files: | ||
Cro templates | .crotmp |
A filename extension is defined, at least for this page, as the remaining letters after and including the final '.'. A filename without a '.' in the filename does not have a filename extension.
Filename extensions can be used to associate behavior with the file content, such as opening a specialized reader or editor, running a program with the file content as input, etc. On some operating systems, this is almost the required behavior. Even when it is not required by the operating system, filename extensions provide a useful mnemonic, or reminder, about the contents of the file.
Early filesystems, the part of the operating system handling filenames, constrained filename extensions to three characters after the '.'. This is no longer a constraint.
The Raku language was for many years known as PerlĀ 6, and filename extensions were adopted accordingly. Consequently, there is a best current practice and a previous best practice. The table at the top is an attempt to list all the filename extensions, starting with the earliest on the left.
The most recent best practice is shown in the last column.
Some modules will become widely used, and will have filename extensions associated with them.
A module developer / maintainer may add to the table and create a PR with the change in the same way as making other changes to the documentation.