or download this
> my $window => Gtk2::Window -> new;
> $window -> signal_connect ( 'delete_event', sub { Gtk2 -> main_quit;
+ } );
...
to fire. Of course, you can also get 'destroy' from other places in y
+our
program. So, if you connect the quit of the main loop to the main win
+dow's
'destroy' rather than 'delete-event', you get a more robust program.