Course of Raku / Advanced / Modules / Modules basics / Export tags

Quiz — Export tags

A module declares sub hello is export and sub goodbye is export(:partings). After use Greeting :partings;, which subroutines can the program call directly?

1Only goodbye
0Only hello
0Both hello and goodbye
0Neither of them

Naming a tag imports that group instead of the default one, so :partings brings in goodbye but leaves hello behind. To get both, you would ask for the built-in :ALL tag with use Greeting :ALL;.

Course navigation

Export tags   |   A maths module