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
providesmaps the module name to the file that implements it, with the directory path matching the::parts of the name.dependslists the other distributions this one needs — here the single entry"JSON::Fast". When someone installsGreet::Simple, the tools will pull inJSON::Fastfirst. An empty array would mean no dependencies.