Gtk+ 2.4 introduces a new file dialog to replace the aged Gtk2::FileSelection. This new widget is actually an interface known as Gtk2::FileChooser; the most-commonly-used implementation of that interface would be Gtk2::FileChooserDialog, a Gtk2::Dialog which has all the methods defined by Gtk2::FileChooser.
This example shows how to use the file chooser to ask the user for a file name; we also add a preview widget and a shortcut, because we can.
1 POD Error
The following errors were encountered while parsing the POD:
Unknown directive: =doc
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.