my $win = Gtk2::Window->new; my $accel = Gtk2::AccelGroup->new; $accel->connect (42, ['control-mask'], ['visible'], sub { # do something }); $win->add_accel_group ($accel);
To install Gtk2, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Gtk2
CPAN shell
perl -MCPAN -e shell install Gtk2
For more information on module installation, please visit the detailed CPAN module installation guide.