So I've been trying to get electron working with Perl6 and looks like after all my efforts of hacking things to get them to work, it just doesn't want to do it's thing. I have used the following script (one of the examples from the electron repo on git):
#!/usr/bin/env perl6
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");
On Running 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 after looking at the submethod i noticed that this was part of the electron module for perl6 and it seems to not like the use of @*INC
within the module.
Has anyone managed to successfully use the electron module with Perl6? Has anyone else come across this error? Is there an easy way around it?
I can probably modify the module to get it to compile and run but I wouldn't know where to start with replacing the @*INC
.