use strict; use warnings; use Gtk2 '-init'; Glib->install_exception_handler (sub { print "exception handler\n"; }); Gtk2::AboutDialog->set_url_hook (sub { print "url hook\n"; die "some error\n"; }); Gtk2::AboutDialog->set_email_hook (sub { print "email hook\n"; die "some error\n"; }); my $dialog = Gtk2::AboutDialog->new; $dialog->set_authors ('Click for Error '); $dialog->set_website ('http://localhost/index.html'); $dialog->set_website_label ('Home Page: Click to throw an error'); $dialog->show; Gtk2->main; print "exit 0\n"; exit 0;