If I recall correctly in Perl 5 the resolution was that the directories in
@INC are ordered
site, vendor, system

I am not sure about Perl 6, but with the above layout I think system would
hold the modules of Rakudo.
vendor would hold the modules of Rakudo Star and site would hold the stuff
that I install myself
using Panda or otherwise.


I ran some experiments from scratch in two ways: (with and without giving
--prefix)
using Rakudo Star 2014.12.1  Source code version and built it on OSX.
I hope these help and I have not just spent time on something that was
already obvious
to everyone else.


1) perl Configure.pl --backends=moar --gen-moar --prefix=/home/gabor/rakudo
   make; make install

$ ~/rakudo/bin/perl6 -e 'say @*INC'
file:/home/gabor/rakudo/languages/perl6/lib
inst:/home/gabor/rakudo/languages/perl6

$ find /Users/gabor/rakudo -name Bailador.pm
/Users/gabor/rakudo/languages/perl6/lib/Bailador.pm

$ ~/rakudo/bin/perl6  /Users/gabor/rakudo/bin/panda
Found no writable directory into which panda could be installed
  in sub make-default-ecosystem at
/home/gabor/rakudo/languages/perl6/lib/Panda/App.pm:18
  in block <unit> at /Users/gabor/rakudo/bin/panda:11

$ ~/rakudo/bin/perl6 -e 'say @*INC'
inst:/Users/gabor/.perl6/2014.12
file:/home/gabor/rakudo/languages/perl6/lib
inst:/home/gabor/rakudo/languages/perl6
inst:/home/gabor/rakudo/languages/perl6/site

*******  So by running panda I got some more entries in @*INC


$ ~/rakudo/bin/perl6  /Users/gabor/rakudo/bin/panda install Bailador
....

$ find /Users/gabor/rakudo -name Bailador.pm
/Users/gabor/rakudo/languages/perl6/lib/Bailador.pm
/Users/gabor/rakudo/languages/perl6/site/lib/Bailador.pm

****** panda installs Bailador in the site  dir which comes after the
regular



1) perl Configure.pl --backends=moar --gen-moar
   make; make install


$ perl6 -e 'say @*INC'

file:/Users/gabor/rakudo-star-2014.12.1/install/languages/perl6/lib
inst:/Users/gabor/rakudo-star-2014.12.1/install/languages/perl6
inst:/Users/gabor/rakudo-star-2014.12.1/install/languages/perl6/site

******** has a different @*INC than what I had when I built it with
--prefix. This one already has a site directory

$ find /Users/gabor/rakudo-star-2014.12.1 -name Bailador.pm
/Users/gabor/rakudo-star-2014.12.1/install/languages/perl6/lib/Bailador.pm
/Users/gabor/rakudo-star-2014.12.1/modules/Bailador/lib/Bailador.pm

****** as I understand the one in the modules directory came with the
source code of Rakudo * and the one in the install is the installed version
of it.

$ ~/rakudo-star-2014.12.1/install/bin/perl6
~/rakudo-star-2014.12.1/install/bin/panda install Bailador
...

$ perl6 -e 'say @*INC'

file:/Users/gabor/rakudo-star-2014.12.1/install/languages/perl6/lib
file:/Users/gabor/rakudo-star-2014.12.1/install/languages/perl6/site/lib
inst:/Users/gabor/rakudo-star-2014.12.1/install/languages/perl6
inst:/Users/gabor/rakudo-star-2014.12.1/install/languages/perl6/site

****** by installing Bailador, the @*INC was changed

$ find /Users/gabor/rakudo-star-2014.12.1 -name Bailador.pm
/Users/gabor/rakudo-star-2014.12.1/install/languages/perl6/lib/Bailador.pm
/Users/gabor/rakudo-star-2014.12.1/install/languages/perl6/site/lib/Bailador.pm
/Users/gabor/rakudo-star-2014.12.1/modules/Bailador/lib/Bailador.pm

***** and now I have a third copy of Bailador.pm


Gabor

Reply via email to