I'm looking for some cleanup of my knowledge. Within a project with complex module structure I'd like to keep the structure clean by building up structured namespace tree. Say, something like:
App
Config
Key
Node
Param
Type
MyType
Every entry under App::Config shall be contained in its own file. Always typing things like App::Config::Key is a time waste. is export doesn't have a parameter to declare the name which is to be exported. So, I finally came to the following solution:
Config.pm6:
unit module App::Config:ver<0.0.1>;
...
Key.pm6:
unit package App::Config;
class Key is export {
...
}
And it works as I want it:
use App::Config::Key;
say Key.^name; # App::Config::Key
The only question remains: a there any caveats? Any hidden side effects to know about?