- or download this
given(Gtk::FileDialog->new()) {
.ok_button.label("Load");
...
.connect_signal(destroy => sub { ... });
# ...
}
- or download this
sub for_obj(
local $_ = shift;
shift->();
$_;
}
- or download this
my $window = for_obj(Gtk::Window->new("toplevel"), sub {
$_->signal_connect(delete => sub { Gtk->exit(0) });
...
});
$_->show;
});
- or download this
sub for_obj { $_[1]->() for $_[0]; $_[0] }