I want to write a wxWidgets application in Perl 6. So I have a minimal Perl5 example that works and try to convert that to Perl 6
Perl5
package YTDL::App;
use YTDL::Frame;
use base qw(Wx::App);
use strict;
sub OnInit {
say "***";
return 1;
}
1;
Perl 6
use Wx:from<Perl5>;
use Wx::App:from<Perl5>;
class YTDL::App is Wx::App
{
sub OnInit {
say "***";
return True;
}
}
It sure looks right. However, the Perl 6 version complains about OnInit not returning true and the method OnInit is not called.
I don't know how to fix this.
holli
You can lead your users to water, but alas, you cannot drown them.