Thanks, I'll try that!
On May 1, 2016 15:31, "Tadeusz Sośnierz" <tadeusz.sosni...@onet.pl> wrote:
> To expand on why putting the file in a directory doesn't Just Work, and
> why so much magic needs to be there for it to work: loading modules is a
> complicated thing in Perl 6, and long story short, if you want to be able
> to have multiple versions installed and loadable at the same time, you need
> some magic under the hood to compensate for that. This magic is what makes
> installing/precompiling a module you want to have installed more
> complicated than a couple of 'mv's.
> If you want to avoid the overhead of panda or other installers (to their
> defense, there are several good reasons why they're so bulky and
> complicated :)), I sometimes use a script based on Module::Toolkit, where
> if you want to "just install the damned thing, nothing else", it's just a
> simple 'mtk install .':
> Hope this helps,
> On 01/05/16 15:23, Brock Wilcox 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>
>> I'm trying to write a module and make a program load and use it.
>> Since this code:
>> perl6 -e 'say $*REPO'
>> 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:
>> Could not find A::B at line 5 in:
>> 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
>> Fernando Santagata