#!/usr/bin/perl package testgtk3; use strict; use diagnostics; use warnings; use Gtk3 '-init'; #use Gnome2::Canvas; use Gnome2::Wnck; my $window = Gtk3::Window->new('toplevel'); $window->signal_connect('delete_event' => sub { Gtk3->main_quit; }); $window->set_border_width(5); $window->set_title('Gtk3 test'); my $button = Gtk3::Button->new("Hello world!"); $button->signal_connect(clicked => sub { my ($button) = @_; print "Hello world!"; $window->destroy(); }); $window->add($button); $button->show(); $window->show(); Gtk3->main(); 1;