Your code works fine for me, I think you need to get the proper version match between the c-libs and the Perl module for Gtk2. Gtk2 is moving to Gtk3, and the last version of the c libs which can still be called Gtk2, is gtk+-2.24.5. After 2.24, it is known as Gtk3, even though it still has a 2.25 numbering. So you might try installing the latest libs, then reinstall the Perl module which corresponds to that lib level.
If it's any help to you, my latest Gtk2 uses cairo-1.10.2, gdk-pixbuf-2.23.4, glib-2.29.8, glib-networking-2.29.9, pango-1.29.3, atk-2.0.1, and gtk+-2.24.5. There is a specific installation order you must follow, but it is explained on the gtk+ installation website.
Those libs are compatible, and can be used with the Perl modules: Cairo-1.062, Glib-1.223, Pango-1.221, and Gtk2-1.223.