So, I tried to get the electron to work with Perl6 and it seems that after all my efforts to hack things in order to make them work, I just do not want to do this. I used the following script (one example of an electronic repo on git):
use v6;
use Electron;
my $app = Electron::App.instance;
LEAVE {
$app.destroy if $app.defined;
}
say Electron::Dialog.show-open-dialog.perl;
say Electron::Dialog.show-save-dialog.perl;
say Electron::Dialog.show-message-box.perl;
Electron::Dialog.show-error-box("Text", "Content");
prompt("Press any key to exit");
When I start, I get this error:
Dynamic variable @*INC not found
in submethod initialize at C:\rakudo\share\perl6\site\sources\42D84B59BC3C5A414EA59CC2E3BC466BBAF78CDA line 54
in method instance at C:\rakudo\share\perl6\site\sources\42D84B59BC3C5A414EA59CC2E3BC466BBAF78CDA line 33
in block <unit> at test.p6 line 9
Actually thrown at:
in method throw at C:\rakudo/share/perl6/runtime/CORE.setting.moarvm line 1
in block at C:\rakudo\share\perl6\site\sources\42D84B59BC3C5A414EA59CC2E3BC466BBAF78CDA line 55
in submethod initialize at C:\rakudo\share\perl6\site\sources\42D84B59BC3C5A414EA59CC2E3BC466BBAF78CDA line 48
in method instance at C:\rakudo\share\perl6\site\sources\42D84B59BC3C5A414EA59CC2E3BC466BBAF78CDA line 33
in block <unit> at test.p6 line 9
And, looking at the submethod, I noticed that this is part of the electronic module for perl6, and it seems that I do not like the use @*INCinside the module.
Has anyone been able to successfully use the electronic module with Perl6? Has anyone else encountered this error? Is there an easy way around it?
Perhaps I can change the module to compile and run it, but I don’t know where to start with the replacement @*INC.