package MyThing; use strict; use warnings; use Gtk2; use Glib::Object::Subclass Gtk2::Button::, interfaces => [ 'Gtk2::Buildable' ]; sub CUSTOM_TAG_START { my ($self, $builder, $child, $tagname) = @_; print "hello from CUSTOM_TAG_START\n"; if ($tagname eq 'mynewtag') { # ... make and return a parser } # how to chain to superclass buildable ? return undef; } package main; use strict; use warnings; use Gtk2 '-init'; my $builder = Gtk2::Builder->new; $builder->add_from_string (' toplevel Press Me '); sub do_click { print "the button was clicked\n"; } $builder->connect_signals; $builder->get_object('toplevel')->show_all; Gtk2->main; exit 0;