Search code examples
rakucommaide

How can you change the perl 6 version you are using or install a new module for the one Comma uses?


When I start a new project in Comma, it pops up the version I am going to use. Instead of allowing me to select from every version in my rakudobrew list, there's a single option, which is not the one I have selected on the command line. When I run a script, it does not find the modules that are already installed. So how can I

  • Change the version of Perl 6 it's using for the current project? Or else
  • How can I install the module it's not finding from Comma IDE?

I can of course get out of comma, change the global Rakudo version, install the module, and then go back to whichever I'm using, but I was wondering how to do that from Comma itself.


Solution

    • To change Perl 6 SDK for the project you go to File -> Project Settings and select project's SDK. Usually it suggests you to choose from not SDKs available from rakudobrew, but one available in your PATH(global, possibly not configured by rakudobrew for this particular shell). So it looks like Perl 6 you have in PATH is not the one that you use from the command line, so the modules are not available.
    • Clicking on New -> Perl 6 SDK in Project Settings you can manually specify a path to a Perl 6 bin directory you want to have as an SDK, so for rakudobrew you should specify e.g. /home/$user/.rakudobrew/versions/moar-2019.07/install/bin directory. If it will be the same location you have in which perl6 in your command line where you install modules, it should work.

    • Right now Comma does not do things related to package management, though this feature is planned.