I created a simple test module ./mods/My/Module.pm6:
unit module My::Module;
use v6;
sub hello () is export {
say "Hello";
}
Then, I have a test script ./p.p6:
#! /usr/bin/env perl6
use v6;
use My::Module;
My::Module::hello();
Then I set PERL6LIB to include the folder ./mods, and then run the script:
$ ./p.p6
Could not find symbol '&hello'
in block <unit> at ./p.p6 line 7
However, if I replace the line My::Module::hello() in the script with hello() it works fine. What am I missing here?