I copied your neat program into a file, called it gtk2test.p6 and got
pugs gtk2_test.p6
***
unexpected ":"
expecting term postfix, operator, ";" or end of input
at gtk2_test.p6 line 2, column 56
However, I am using pugs from the debian package and not directly from
the repository. So perhaps, the problem is I am not using the latest
version of pugs.
Regards,
Richard
A. Pagaltzis wrote:
* Richard Hainsworth <[EMAIL PROTECTED]> [2006-09-17 18:05]:
The .can workaround doesnt seem to work for more complex
modules.
Err, the .can workaround is a way to get past missing sub
exports. Methods are never exported. Why are you using the
workaround for sub exports on methods.
Here is a working perl5 program that puts up a message with two
buttons.
use strict;
use Gtk2 -init;
use Gtk2::Ex::Dialogs(destroy_with_parent=>-1, modal=>-1, no_separator => 0);
my $window = Gtk2::Window->new('toplevel');
Gtk2::Ex::Dialogs->set_parent_window( $window );
my $r = Gtk2::Ex::Dialogs::Question->ask( "Is Perl only hackers glue?");
if ($r) {print "yes\n";} else {print "no\n";};
Should be simply:
use perl5:Gtk2 '-init';
use perl5:Gtk2::Ex::Dialogs :destroy_with_parent( -1 ) :modal( -1 )
:!no_separator;
my $window = Gtk2::Window.new( 'toplevel' );
Gtk2::Ex::Dialogs.set_parent_window( $window );
my $r = Gtk2::Ex::Dialogs::Question.ask( "Is Perl only hackers glue?" );
say $r ?? 'yes' !! 'no';
Regards,