Starting from the end: there's no need to use github, panda can install
stuff just fine from a local directory :)
As for the directory layout,
https://github.com/rakudo/rakudo/blob/nom/docs/module_management.md is
probably the best source to learn how it works under the hood.
Hope this helps,
tadzik
On 01/05/16 15:35, Fernando Santagata wrote:
Yes, that works too. But I was just trying to understand how the
directory layout works.
In particular I was trying to reproduce what panda does, since I
didn't want to use github.com <http://github.com> just to install a
test module.
I found no documentation about this, so I tried this mailing list.
On May 1, 2016 15:23, "Brock Wilcox" <awwa...@thelackthereof.org
<mailto:awwa...@thelackthereof.org>> wrote:
I recommend putting your module into a 'lib' dir near your script.
Then in your script add:
use lib 'lib';
That way you don't have to add the -l param.
On May 1, 2016 09:21, "Fernando Santagata"
<nando.santag...@gmail.com <mailto:nando.santag...@gmail.com>> wrote:
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