When I run a perl raku command-line program a lib directory (and precomp files) appear in the current working directory - how can I prevent/avoid this?
Why would you want to do that? They are, effectively, precompilation files that will later on be used when you run it again. You can prevent from adding them to the repository by adding .precomp
to your .gitignore
file, but they are useful files that are inherent to running Perl 6.
As indicated in this answer, that might be due to .
being included in your PERL6LIB variable. You can delete it from there to prevent that from happening in the current directory. It can still happen somewhere else, though.
Rakudo Perl 6 uses a chain of repositories for loading modules. If you load a module and it isn't in the top repository it will look in the next one, and so on.
It will also precompile modules for faster loading the second time they are used.
Typically if you install a module it will be used once in such a way that its precomp file will be placed in the repository where it is installed.
If it's not in there when you go to use it a new one will be created.
Since it doesn't necessarily know what other modules it relies on, this precomp file is always placed in the head of the repository chain.
So you obviously have a module that doesn't have a precomp, and you have ./lib
somehow at the top of your repository chain.
It could be in PERL6LIB
, a -I
command-line argument, or a use lib './lib';
line in your code.
You could try reinstalling the module to see if that stops it from happening.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With