Course of Raku / Advanced / Modules / Distributing modules 🆕 / Exercises / A META6 file

Solution: A META6 file

Here is a possible solution to the task.

Code

META6.json:

{
    "name": "Greet::Simple",
    "version": "0.0.1",
    "description": "A simple greeting module",
    "authors": [ "Your Name" ],
    "license": "Artistic-2.0",
    "depends": [ "JSON::Fast" ],
    "provides": {
        "Greet::Simple": "lib/Greet/Simple.rakumod"
    }
}

🦋 You can find the source code in the file META6.json.

Comments

  1. provides maps the module name to the file that implements it, with the directory path matching the :: parts of the name.

  2. depends lists the other distributions this one needs — here the single entry "JSON::Fast". When someone installs Greet::Simple, the tools will pull in JSON::Fast first. An empty array would mean no dependencies.

Course navigation

A META6 file   |   The module layout