Steffen Schwigon <[EMAIL PROTECTED]> writes: > Richard Hainsworth <[EMAIL PROTECTED]> writes: >> use perl5:Wx; >> my $app = Wx::SimpleApp.new; >> my $frame=Wx::Frame.new(undef, -1, 'Hello world!'); >> $frame.Show; >> $app.MainLoop; >> >> The following is the result: >> $pugs wxtest.p6 >> *** No compatible subroutine found: "&Wx::SimpleApp" >> at wxtest.p6 line 2, column 1-28 >> >> Is the perl6 wrong? >> >> I have also tested >> use perl5:Wx <SimpleApp>; > > Maybe an additional > > use perl5:Wx::SimpleApp; > > ? I'm just guessing...
Hm. Generally I have much more success using Perl5 modules with Pugs 6.2.13. But maybe Wx is a bit harder. I tried to trick it with an additional Perl5 helper to not use the indirect namespaces, like this: WxHelper.pm (Perl5): package WxHelper; use Wx; sub new_SimpleApp { return Wx::SimpleApp->new(@_); } sub new_Frame { return Wx::Frame->new(@_); } 1; This adapted to your little program (Perl6): #! /usr/bin/pugs use perl5:Wx; use perl5:WxHelper; my $app = WxHelper.new_SimpleApp; my $frame = WxHelper.new_Frame(undef, -1, 'Hello world!'); $frame.Show; $app.MainLoop; But now I get sub must be a CODE reference at /usr/local/lib/perl/5.8.7/Wx/App.pm line 36. I don't know Wx, maybe you have an idea for this, e.g. another way to start a mini application. BTW, I tried it on Linux with GTK bindings. GreetinX Steffen -- Steffen Schwigon <[EMAIL PROTECTED]> Dresden Perl Mongers <http://dresden-pm.org/>