> On 19 Jul 2022, at 20:49, ToddAndMargo via perl6-users <[email protected]>
> wrote:
> As an aside, Raku still reads my Perl 5 ".pm"
> modules before reading my Raku ".pm6" modules.
> Raku default to ".pm" before ".pm6". The
> compiler wags its finger at me a lot!
>
> So I have to segregate my ".pm6" modules
> into a special directory , which I
> call "p6mod". ("p5lib" for Perl 5.)
>
> I wonder if there is a way to get Raku
> to stop reading ".pm" altogether?
Making it stop reading altogether, will probably take some time still to avoid
breaking current production environments.
However, I have just verified: If you have:
- lib
|- A.rakumod
|- A.pm6
|- A.pm
and you do a:
$ raku -Ilib -MA -e ''
it *will* load the A.rakumod file. And if you remove that, it will load the
A.pm6 file. Only if there's only a A.pm file in the "lib" directory, will it
load that.
You should realize that *if* a repository *can* satisfy a request for a module,
then it will.
Could it be that you have a "Foo.pm" in an "earlier" directory and a "Foo.pm6"
in a later directory in the $*REPO chain?
Liz