Note that currently in a Perl subclass of Gtk2::InfoBar a class closure, ie. class default signal handler, for the response signal will be called with the response ID just as an integer, it's not turned into an enum string like "ok" the way a handler setup with signal_connect receives.
Hopefully this will change in the future, so don't count on it. In the interim the easiest thing to do is install your default handler in INIT_INSTANCE with a signal_connect. (The subtleties of what order handlers are called in will differ, but often that doesn't matter.)
The response type is somewhat abnormal as far as gtk2-perl enums go. In C, this enum lists named, predefined integer values for a field that is other composed of whatever integer values you like. In Perl, we allow this to be either one of the string constants listed here or any positive integer value. For example, 'ok', 'cancel', 4, and 42 are all valid response ids. You cannot use arbitrary string values, they must be integers. Be careful, because unknown string values tend to be mapped to 0.
Alias for the multi-argument version of Gtk2::InfoBar->new.
The multi-argument form takes the same list of text => response-id pairs as $infobar->add_buttons. Do not pack widgets directly into the infobar; add them to $infobar->get_content_area ().
Here's a simple example:
$infobar = Gtk2::InfoBar->new ('gtk-ok' => 'accept',
'gtk-cancel' => 'reject');