Hello,

I'm trying to write a module and make a program load and use it.
Since this code:

perl6 -e 'say $*REPO'

outputs:

inst#/home/nando/.perl6

I thought that putting the .pm6 file in there would be enough. So, since my
module is A::B, I put B.pm6 into ~/.perl6/A .
But when I run a test program which loads A::B, I receive this error:

===SORRY!===
Could not find A::B at line 5 in:
    /home/nando/.perl6
    /home/nando/.rakudobrew/moar-2016.04/install/share/perl6/site
    /home/nando/.rakudobrew/moar-2016.04/install/share/perl6/vendor
    /home/nando/.rakudobrew/moar-2016.04/install/share/perl6
    CompUnit::Repository::AbsolutePath<140256602878904>
    CompUnit::Repository::NQP<140256602876152>
    CompUnit::Repository::Perl5<140256602873560>

If I run the test program this way it works:

perl6 -I ~/.perl6 ./test.p6

Why is that? Where should I put the module file to be seen automatically,
without adding the -I option?

As a side note, if I want to precompile the module, as panda does when
installing new modules from the repository, where should I put the .moarvm
file?

Thanks!

-- 
Fernando Santagata

Reply via email to