package Foo;
use strict;
use warnings;
use Gtk2 '-init';

use Glib::Object::Subclass
  'Gtk2::FileChooserDialog';

sub INIT_INSTANCE {
  my ($self) = @_;
  print "INIT_INSTANCE for $self\n";
  $self->set (action => 'save');
}

package main;
use strict;
use warnings;

my $foo = Foo->new;
print "new gives $foo\n";

exit 0;
