in reply to [Perl6] Problem using Inline::Perl5

Hi,

So the perl6 version is loading the perl5 module?

How does perl6 tell perl5 about classes created in perl6 ?

Try this , it makes no classes ;)

use Wx qw/ :allclasses /; my $app=Wx::SimpleApp->new; my $frame = Wx::Frame->new( undef,-1,"Sand!" ); $frame->Show; $app->MainLoop;

Replies are listed 'Best First'.
Re^2: [Perl6] Problem using Inline::Perl5 (Wx)
by Corion (Patriarch) on Dec 17, 2016 at 23:12 UTC

    Perl 6 has Perl5::Inline, so you can run Perl 5 code under Perl 6 and get full inheritance both ways. Or so nine's talk says.

Re^2: [Perl6] Problem using Inline::Perl5 (Wx)
by holli (Abbot) on Dec 20, 2016 at 06:57 UTC
    I tried that too
    use Wx:from<Perl5>; my $app = Wx::SimpleApp.new; my $frame = Wx::Frame.new( Nil, -1, 'Hello, world!' ); $frame.Show; $app.MainLoop;
    fails complaining about the symbol "SimpleApp" not being known.


    holli

    You can lead your users to water, but alas, you cannot drown them.

      Hi,

      Does the perl5 program run from perl5?

      If so, then it sounds like a bug in Inline::Perl5 to me :)

      Also, the two programs arent exactly equivalent, missing  Wx.import(':allclasses'); or some such

      update: odd, saw no docs the other day at https://github.com/niner/Inline-Perl5 , this would be equivalent  use Wx:from<Perl5> <:allclasses>; so the new program

      use Wx:from<Perl5> <:allclasses>; use Wx::SimpleApp:from<Perl5>; use Wx::Frame:from<Perl5>; my $app = Wx::SimpleApp.new; my $frame = Wx::Frame.new( Nil, -1, 'Hello, world!' ); $frame.Show; $app.MainLoop;