#!/usr/bin/perl -w use strict; use Gtk2; sub quit { exit(0); } sub button_func { my ($button, $user_data) = @_; Gtk2->show_about_dialog($user_data, authors => ['Random. J. Hacker'], comments => 'FooBar frobz your widgets', copyright => 'Copyright 2005 Random J. Hacker', name => 'FooBar', version => '3.141'); } { # main Gtk2->init; my $window = Gtk2::Window->new('toplevel'); $window->signal_connect(destroy => \&quit); my $button = Gtk2::Button->new_with_label("Click me"); $button->signal_connect(clicked => \&button_func, $window); $window->add($button); $window->show_all; Gtk2->main; }